Plot Examples-2

2D Plots of Functions

Plots of Predefined Functions

Sin[x] and Cos[x] are predefined functions. They can be readily plotted using predefined function Plot [ ],
Plot [function [free (independent) Variable] , {free (independent) Variable , initialValue , finalValue , options (if there is any)}]

2DPlots_1.png

2DPlots_2.gif

2DPlots_3.png

2DPlots_4.gif

We may combine them with more then one way,

2DPlots_5.png

2DPlots_6.gif

In[4]:=

{p1, p2}

2DPlots_7.gif

2DPlots_8.png

2DPlots_9.gif

2DPlots_10.png

2DPlots_11.gif

2DPlots_12.png

2DPlots_13.gif

Plots of User Defined Functions

2DPlots_14.png

2DPlots_15.png

2DPlots_16.gif

2DPlots_17.png

2DPlots_18.gif

2DPlots_19.png

2DPlots_20.gif

2DPlots_21.png

2DPlots_22.gif

It is better, to define user defined functions as f[independentVariable_] : = Expression having one independentVariable declared in the definition of the function.

2DPlots_23.png

2DPlots_24.png

2DPlots_25.png

2DPlots_26.png

2DPlots_27.png

Functions are expressions which have single dependent variable (y) for any defined value of the independent variable (x). The interval which independent variable spans is called ``Domain” and related dependent variable interval ``Range”.

Every function give a single dependent variable (y) value, for any defined value of the independent variable (x). This constitutes an {x,y} point in 2D projection surface. That means functions produce a distinct point in a 2D area per defined values of the independent vaiable. We can explore these points using Table [ ] function of Mathematica.

2DPlots_28.png

We can plot g[x] in the domain of x [0,20] with increments of 2, that will give the mapping of the points of t1 in 2D space. The procedure is explained in our paper ´´ScatterPlot.pdf”.

2DPlots_29.png

2DPlots_30.png

2DPlots_31.png

2DPlots_32.gif

This not exact mapping of the t3 of course, Mathematica has produced more points for better explaining the peaks or downhills of the dataset t3. This is achieved with sophisticad curve fitting abilities of Mathematica.

2DPlots_33.png

2DPlots_34.gif

Mathematica has issued normals to the x axis. This may be best understood by another less dense set.

2DPlots_35.png

2DPlots_36.gif

2DPlots_37.png

2DPlots_38.gif

Mathematica has fitted a curve for joing the points of the list t3.

2DPlots_39.png

2DPlots_40.gif

2DPlots_41.png

2DPlots_42.gif

This is another option applied to Plot [ ] function. Mathematica has produced a fitting lines like Bézier curves for joining the points of the vector supplied.

We can see all plots together :

2DPlots_43.png

2DPlots_44.gif

ImageSize is another option for setting the size of the image produced by Mathematica. Alternatively it is possible to drag the edges of the image by mouse. Note that the GraphicsGrid [ ] function, produce a single image covering all the indicated plots.

The raw plot of the function y = 2DPlots_45.png at the domain [0,20], show discontinous regions in the up and down peak areas as 2DPlots_46.gif . This is due to the range automatically chosen by Mathematica was too short to produce an adequate plot of the function in 2D space. We can add -for this case we must- to clarify by hand, what we have in mind for the range of this function when plotting with Mathematica. This is accomplished, by stating a range interval to the Plot [ ] function by means a ``PlotRange´´ option.

2DPlots_47.png

2DPlots_48.gif

We can also supply an user defined plot range :

2DPlots_49.png

2DPlots_50.gif

Fine. We are beginning to understand better the options for the Plot [ ] function of the Mathematica.

Manipulations

Manipulations is changing some value affecting the function definition bzw. the plot of the function by mouse.

2DPlots_51.png , 2DPlots_52.png }] (*  u any value between 2DPlots_53.png , 2DPlots_54.png *)

2DPlots_55.png , 2DPlots_56.png }] (*  u any value between 2DPlots_57.png , 2DPlots_58.png ,with steps of dt*)

2DPlots_59.png

2DPlots_60.png

Drag a and b with mouse to some value other than 0 and you will see the plot with the new definitions for a and b.

2DPlots_62.png

Manipulations can only be active in Mathematica notebook files (*.nb). For publishing the notebooks contianing manipulations, one must publish them as (*.cdf) instead of [*.html or *.htm] or (*.pdf). The cdf reader is free and may be downloaded freely from Wolfram website. When published with other formats, manipulations may be observed but can not be manipulated.

Options

Plots may be enhanced using various options. Mahematica offers a multitude options that can be implemented by the user. Bu the vaste number of these options make them very difficult to master all of these. The compromise is choosing from the options the ones that more generally applied to most instances of function plotting.

Frames

Plots in Mathematica are better shown by incorporating within a frame. Frames for plots are defined as :

For RefLink[ Graphics ,paclet:ref/Graphics] , RefLink[ Plot ,paclet:ref/Plot] , and related functions, RefLink[ Frame ,paclet:ref/Frame]->{{ left , right },{ bottom , top }} specifies whether to draw a frame on each edge. With the default setting RefLink[ FrameTicks ,paclet:ref/FrameTicks]->RefLink[ Automatic ,paclet:ref/Automatic] , ticks are included whenever a frame is drawn.

2DPlots_64.png

2DPlots_65.png

2DPlots_66.gif

Now frames become equivalents of axes. The motivation of axes/Frame interchange is the oppotunity to label the frame at the middle of the frame. This opportunity is not given to the axes specification which may only labeled at their extreme ends by their predefined function. But this is possible with using Text [ ] subroutine of the Graphics [ ] function. This will be shown at the later pages of this manuscript.

There are many options for making the labels more stylish or prone to publication.

Each label may have only one option without applying Directive rule.

2DPlots_67.png

2DPlots_68.gif

2DPlots_69.png

2DPlots_70.png

2DPlots_71.gif

The styles of the frames drawn in above plot are colored by means of FrameTicksStyle rule. It can handle only one option without calling Directive [ ] function. Mathematica has multitude of ways of specify colors. We may consult Mathematica Documents for how to specify colors and try them using this plotting template.

2DPlots_72.png

2DPlots_73.gif

With Directive [ ] function we have more opportunities,

2DPlots_74.png

2DPlots_75.gif

With Directive Function, we can also set FontFamily and FontSize rules together with a colored text.

2DPlots_76.png

2DPlots_77.gif

Labeling of the Plot is made by applying PlotLabel rule with LabelStyle [ ] function. The Directive [ ] function may be called for more styling options.

2DPlots_78.png

Graphics:x sin(x)

FrameLabel → rule may be applied for labeling the edges of the frame with style. FrameLabel→None specifies that no labels should be given.

FrameLabel → label specifies a label for the bottom edge of the frame.

FrameLabel]→{ bottom , left } specifies labels for the bottom and left-hand edges of the frame.

FrameLabel→{{ left , right },{ bottom , top } specifies labels for each of the edges of the frame.

Any expression can be specified as a label.

Labels for the vertical edges of the frame are written vertically by default . For the horizontal labels we may set RotateLabel--> False

2DPlots_82.png

Graphics:x sin(x)

The following settings can be given for GridLines :

With the GridLines --> Automatic setting, grid lines are usually placed at points whose coordinates have the minimum number of digits in their decimal representation.

For each direction, the following grid line options can be given:

GridLines --> None , no grid lines drawn.

GridLines --> Automatic , grid lines placed automatically.

GridLines --> {xgrid , y grid}   grid lines specified separately in each direction.

2DPlots_84.png

2DPlots_86.png

2DPlots_88.png

Grid line styles can involve any graphics directives, such as RGBColor and Thickness.

The grid line function 2DPlots_89.png may return any other grid line option.

AbsoluteOptions gives the explicit form of GridLines when Automatic settins are used.

GridLinesStyle gives default styles to use for grid lines.

GridLinesStyle --> style specifies that all grid lines should be rendered by default with the specified style. /p>

GridLinesStyle --> {x style, y style} specifies that x and y grid lines should use different styles.

Styles can be specified using graphics directives such as Thick, Red and Dashed , as well as Thickness, Dashing, RGBColor and combinations given by Directive [ ].

Style specifications can refer to styles using style names from current stylesheets.

Any outside styles not explicitly overridden by settings in GridLinesStyle will still be used.

Explicit styles specified in the settings for GridLines can override styles specified in GridLinesStyle.

The default style of axes is specified by the option DefaultGridLinesStyle

2DPlots_90.png

Graphics:x sin(x)

For a last touch , we’ll adjust the size of the image,

2DPlots_92.png

Graphics:x sin(x)

We can easily watch narrower domains in order to understand better the behavior of the function. Example :

2DPlots_94.png

Graphics:x sin(x)

Obtaing black and white versions are more easy.

2DPlots_96.png

Graphics:x sin(x)

Aspect Ratio

Aspect ratio is the ratio 2DPlots_98.png and may be set by the user or set as Automatic or unstated by leaving the arrangement to its default value

2DPlots_99.png

Graphics:x sin(x)

The deafult is 1/GoldenRatio and if it is the case, we do not have to mention it in the graph program.

2DPlots_101.png

Graphics:x sin(x)

Every function, except the Identity function y = x, result with different values of range for a fixed domain. Therefore the setting of aspect ratio is of ultime importance. We should consider carefully the trend of our function and choose a proper aspect ratio. By the way, for the Identity function,

2DPlots_103.png

2DPlots_104.gif

We can try different aspect ratios for specific functions and find the best one that fit our needs.

Discontinuous Functions

Not All fonctions are continuous in the domain (-∞,∞) that is, some values of the dependent variable of this domain do not produce known values of the function. This is called ``discontinuation”. Discontinuation property is purely dependent of the configuration of the function. Functions which exhibit discontinuties are called ``Discontinious Functions” .

Most rational functions exhibit discontinuative property owing to certain values of x which produce 2DPlots_105.png ratio, with a being a real number.

Function discontinuity is not a simple subject to tackle at once. We should get proper familiarity about the discontinuties of the functions. A website defining concisely and comprehensibly the subject is https://www.math24.net/discontinuous-functions/ . We will follow the subject from their web pages. First discontinuity map devised according the definitions of this site is  presented blow:

2DPlots_106.gif

If f(x) is not continuous at x=a, then f(x) is said to be discontinuous at this point. Figures 1−4 show the graphs of four functions, two of which are continuous at x=a and two are not.

2DPlots_107.gif

2DPlots_108.gif

Classification of Discontinuity Points

2DPlots_109.gif

We will begin with discontinuities of first kind. The functions having defined limits in both sides of the point x = a , (a) being a real number in the domain of the function and the limits of the function are real and equal to each other in both sides of (a) is a function having first class removable discontiniuty which is not a jump discontinuation property. we will call these functions as ``Functions having ``A” type first class discontinuation property. Functions which exhibit jump discontinuity will be called as ``B” type first class discontinuation.

For understanding whether the function has some kind of discontinuation we will look at first to its graph. But careful : First class A type discontinuations (without a jump) can not be spotted from their graphs. Graphs may only reveal first class jump discontinuations (class B) and second kind non removable discontinuations. Then mathematical investigation in form of finding both side limits must be taken into account. We will follow these paths in examining the functions about their discontinuities.

Since we will need to find some limits and roots of equations, it is important to know, how the limits and roots of equations are found with Mathematica.

Limits in Mathematica

Limits in Mathematica are found by the application of the function Limit [ ]. The general form of application for any function f[x] defined previously .

Limit[f[x] , x → a]

For finding the lower (left) or upper (right) limit when x aproaching a,

Limit[f[x] , x → a-0] and Limit[f[x] , x → a+0]

or,

Limit[f[x] , x → a ,Direction→ -1] and Limit[f[x] , x → a Direction→1]

Limit[f[x] , x → a ,Direction→ -1]  means the limit of the function f[x] when x tends to a, approaching from above. (-1 means from +∞ to -∞) or (from right to left)

Limit[f[x] , x → a ,Direction→ 1]  means the limit of the function f[x] when x tends to a, approaching from below. (1 means from -∞ to 4∞) or (from left to right).

Roots of the equations with Mathematica

Mathematica include different  methods for finding the roots of equations. Normally using Solve [ ] function wiil be enough to spotting the roots of most equations. but for problematic ones, one may try more sophisticated functions provided form mathematica.

Usage of Solve function is,

Solve[f[x](== for equal, < for less than, > for greater than) right side term, {independentVariable}]

We are now ready for looking after the discontinuities.

2DPlots_110.png

2DPlots_111.png

Find a discontiniuty of the function,

2DPlots_112.png

Solution :

Altough it not fully informative about all the discontinuities (discontinuities of the first class type A can not be understood from the graph of the function) we will always begin by investigation of the graph of a function. Bu we will not rely completely on the primary information obtained form the graph for the final decision about the discontinuity of the function examined.

2DPlots_113.png

2DPlots_114.png

2DPlots_115.png

2DPlots_116.png

The graph of this function,

2DPlots_117.png

2DPlots_118.gif

The graph show a false impression so that an unaware may decide that the given function is continous. In fact it is not. Since the given function has not changed its structure and still rational after the simplification, we will examine whether the function becomes 2DPlots_119.png

For clarifying this situation, we will make an equation with the denominator term of the given function equals to zero. For our example,

2DPlots_120.gif

2DPlots_121.png

We got number of roots, some of them are real, some of them is complex. But for tems of discontinuity real or complex values makes no difference they all cause discontinuities.

Plots of functions having discontinuities with Mathematica, result with graphs where the asymptotes are not shown. To make them visible, we have to add some options.

Plot[f, {x, a,b}, Exclusions → {list}]

Mathematica, by default take  Exclusions → All, to make them visible we should turn it to  Exclusions → None

2DPlots_122.png

2DPlots_123.gif

Plots of Mathematica can not indicate the points where the function has type A discontinuity. We should not rely to the Mathematica plots on the subject, the final decision must be taken only after mathematical analysis.

Example

Find a discontiniuty of the function,

2DPlots_124.png

2DPlots_125.png

2DPlots_126.png

2DPlots_127.gif

The neighborhood of a region where small changes of the independent variable result big changes of the dependent variable is the region of discontinuity of the function. From the graphical result, we conclude that the given function has a type 2 unremovable discontinuity at x = 1 . The plot also show that an asymptotic line exist at x = 0 . We will bring the vertical asymptote at light by adding the option, Exclusion → None.  

2DPlots_128.png

2DPlots_129.gif

Clearly, the function 2DPlots_130.png has a vertical asymptote, normal to the x axis at point {1 , 0} indicated by the graph of the function. But we must always find the exact values by mathematical methods.

2DPlots_131.png

2DPlots_132.png

Mathematica confirms that the given function has an asimptote at x = 1 as,

2DPlots_133.png

2DPlots_134.png

2DPlots_135.png

Whether the upper and lower limits from each side exists, will be detected by Mathematica,

2DPlots_136.png

2DPlots_137.png

2DPlots_138.png

2DPlots_139.png

The limit examination with Mthematica, reveals that, limits in both directions in the discontinuity point x = 1, is Indeterminate in both sides.This indicates that the given function has an essential (unremovable) discontinuity named ``Discontinuity of the Second Kind” at the point x = 1.

Example

Find whether the function y = 2DPlots_140.png has discontinuities.

Solution

We’ll begin by tracing its graph.

2DPlots_141.png

2DPlots_142.png

2DPlots_143.png

2DPlots_144.gif

The function indicates that the given function has two discontinuities about 1 and -1, let us spot them more precisely.

2DPlots_145.png

2DPlots_146.gif

The graphic output show that there is two asymptotes at -1 and 1 . More precise locations will be indicated by more detailed graphs.

2DPlots_147.png

2DPlots_148.gif

2DPlots_149.png

2DPlots_150.gif

2DPlots_151.png

2DPlots_152.gif

2DPlots_153.png

2DPlots_154.gif

2DPlots_155.png

2DPlots_156.gif

It is confirmed that the given function has two discontinuities at the points x = -1 and x =1 . Let us look with a bigger image sizes,

2DPlots_157.png

2DPlots_158.gif

More precise locations of aymptotic lines, are to be found by mathematical analysis.

The function structure is of type 2DPlots_159.png and indeterminable when 2DPlots_160.png . We will look for an x which will cause, 2DPlots_161.png indeterminate. Let  us simplify this rational expression.

2DPlots_162.png = 2DPlots_163.png = 2DPlots_164.png

2DPlots_165.png

or,

2DPlots_166.png = 0 ; 2DPlots_167.png = 0 ; 2DPlots_168.png = 1 ; 2DPlots_169.png - 1 = 0 ; (x-1)(x+1) = 0; x = 1 or x = -1

or simply

2DPlots_170.png

2DPlots_171.png

These two values make 2DPlots_172.png equal to zero, this  makes   2DPlots_173.png indeterminate which makes in turn, 2DPlots_174.png as indeterminate. The points (-1) and (1)  are the discontinuity points found algebraically and they are confirmed by the graph of this function.

Upper and lower limits  in the neighborhood of these points, will show the type of discontinuity of this function.

2DPlots_175.png

2DPlots_176.png

2DPlots_177.png

2DPlots_178.png

For the final result, the given function is determined to have essential, nonremovable second class discontinuities at the points x = -1 and x =1. This is supporting by mathematical anaysis and by the results obtained from graphical investigations.

Example

Find the discontinuities of the function y = 2DPlots_179.png .

Solution

2DPlots_180.png

2DPlots_181.png

First we plot this function as usual :

2DPlots_182.png

2DPlots_183.gif

At first sight, the function seems to be continious by its graph. But, this is not the case. We should not forget there is a single x in the denominator. When this x will be equal to zero in the range [-2 , 2] the function will have a discotinuity.

From the plot of this function, we observe that the discontinuity is not a jump discontinuty, in contrary it is a point  discontinuty. This will imply also that if x will be near in both sides about ε (epsilon) the function will tend to its limit δ =1 in both side the value of the discontinuity without being equal to it. Then various types of discontiuties occur depending the structure of the function.This is first class A type removable discontinuity because the limits of both sides of the asymptotic line is real and equal to each other. This make this function piecewise, but contigious in -ε and + ε advances of the independent variable (x) before and after the point of discontinuity.

This make the function piecewise but this stay unnoticed when inspecting the graph of the function. To understand the piecewise behavior of the function we will graph each piece separately :

2DPlots_184.png

2DPlots_185.gif

2DPlots_186.png

2DPlots_187.gif

The plot of this function is nothing than a seamless plotting of both pieces separately but contigiously due to the sophisticated intricate plotting function of Mathematica, which plot the first order class A functions aa a single graph whose discontinuities can not be noticed by eyes. Even adding the option ``Exclusions→None” will not help for having the exlusion point be inserted within the graph.

Mathematica has a Piecewise[ ] function but this function is most useful in function having jump discontinuities and essential discontinuities . For function plotting,  simple Plot [ ] function will suffice, with or without ``Exclusions→None option. Note that for the functions having first order class A discontinuities stating Exclusions→ All is unnecessary.

2DPlots_188.png

2DPlots_189.gif

2DPlots_190.png

2DPlots_191.gif

Adding Piecewise[ ] function is not enhancing the graph compared to the graph produced by a simple Plot [ ] function.

This function has a removable discontinuity at at x=0. This cannot be seen in graphs and even Mathematica does not help. The discontinuity may only be understood by finding the value of the independent variable (x) which makes the value of the function ``Unknown” and this value is conventionally considered as ``Infinity” (∞) .

The function 2DPlots_192.png ,  for x = 0, has a limit conventionally equal to infinity (whatever the meaning is) and in this value of free variable, the  left and right limits are numeric and equal to each other.

2DPlots_193.png

2DPlots_194.png

This result prove that the given function has a first class A type removable discontinuity because limits of the both sides are numeric and equal to each other. This kind of discontinuity is not remarquable by plotting but with only by mathematical analysis.

Graphs of Mathematica can also be enhanced using options or using ``Drawing Tools” of the Mathematica. Drawings tools is considerably makes adding arrows, lines, text easy avoiding time consuming programming steps.

Drawing Tools are supplied in recent versions of Mathematica and its use simplify the plot decoration, but there is constraints for using Drawings Tools.

Producing plots is a two step process. First step is the generation of plot by using predefined functions of Mathematica. The second step is to decorate the plot with texts, Lines, Arrows and other graphic objects. This can be achieved either by Graphic functions (time consuming) or Drawing Tools (fast and easy).

Drawing Tools is for plots which are ultimate. When the plot is mathematically reached at its ultimate final step, then it is more advantaguous to finish with Drawings Tool and save the image elsewhere for publishing or else.

If we plan to further inspect by altering some options, then using graphic functions will be far more better, since with every new generated version of the plot we will have the same graphic retouches included in the program steps and not  by Drawings Tools. On the contrary, if we had used drawing tools we’ll have to make same retouches with drawing tools, every time the new version of the graph would be produced.

We will proceed by applying the required graphic add-ons by using Mathematica graphic functions. Adding text methods is shown below:

Graphics Primitives for Text

With the Text graphics primitive, you can insert text at any position in two - or three - dimensional Mathematica graphics. Unless you explicitly specify a style or font using Style, the text will be given in the graphic’ s base style.
Text[expr, {x, y }]     [text centered at the point {x, y}
Text[expr, {x, y}, {-1, 0}]      text with its left - hand end at {x, y }
Text[expr, {x, y}, {1, 0} ]        right - hand end at {x, y}
Text[expr, {x, y}, {0, -1}]        centered above {x, y}
Text[expr, {x, y}, {0, 1}]          centered below {x, y}
Text[expr, {x, y}, {dx, dy}]      text positioned so that {x, y} is at relative coordinates {dx, dy} within the box that bounds the text
Text[expr, {x, y}, {dx, dy}, {0, 1}]        text oriented vertically to read from bottom to top
Text[expr, {x, y}, {dx, dy}, {0, -1}]       text that reads from top to bottom
Text[expr, {x, y}, {dx, dy}, {-1, 0}]       text that is upside - down
(ın two - dimensional plots).

It would be not so easy working with Mathematica graphic functions, if some previously worked examples is not at hand. A program applied below to our example, is shared by the University of Texas in Austin.

2DPlots_195.png

2DPlots_196.png

2DPlots_197.png

2DPlots_198.png

2DPlots_199.png

2DPlots_200.png

2DPlots_201.gif

Example

2DPlots_202.png

2DPlots_203.png

Let us plot and see ,

2DPlots_204.png

2DPlots_205.gif

This two functions are not a true piecewise function. These are two different functions. Their structure and domains make them to seem as piecewise.

2DPlots_206.png

2DPlots_207.png

Example

2DPlots_208.png

Solution

2DPlots_209.png

2DPlots_210.png

Let us plot this function :

2DPlots_211.png

2DPlots_212.gif

The function has a discontinuity of the second kind (non-removable jump discontiniuty) at x =0. At least one of the side limits should be indeterminate (complex infinity).

2DPlots_213.png

2DPlots_214.png

That show that the given function has a second class nonremovable essential discontinuty. The graph of the function in this case is extremely important. The values of the function at the near vicinity of the asymptotic line tending to the different infinities is only observable from the plot of these functions. Also careful attempts to assess the values in the vicinities of the asymptotic line is also informative.

2DPlots_215.png

2DPlots_216.png

This show that the observed function is a piecewise function. Let us plot it as a piecewise function.

2DPlots_217.png

2DPlots_218.gif

Example

Find the points of discontinuity of the function f(x) 2DPlots_219.png

The point of discontinuity :

2DPlots_220.gif

2DPlots_221.png

2DPlots_222.png

This function is discontinous only at x = 2DPlots_223.png and continious elsewhere. Let us plot and see its behavior :

2DPlots_224.png

2DPlots_225.gif

The upper and lower limits :

2DPlots_226.png

2DPlots_227.png

Out[8]=

{Indeterminate, Indeterminate}

2DPlots_228.png

2DPlots_229.png

Limits at the near neighborhood of the asymptotic line at x = -2.5 is found as indeterminate. But the values of the function in sufficient distance from the asymptotic line are real but not the same. Observations from the plot of these functions is of higher importance. The graph and algebraic results reveal that this function has a discontinuity of the first kind (removable discontinuity) at the point {-2.5,0}. The first kind discontinuity is of class B (removable jump discontinuity), since the values sufficiently away from the asymptotic line are real but different from each other. This a piecewise function whose enlarged graph is shown below.

2DPlots_230.png

2DPlots_231.gif

Mathematica can handle more fine tunings on piecewise functions. More information may be found in Mathematica Definitions .

Functions Plotted Together

Plotting functions together makes only sense if these functions share common domain of the common independent variable and give about the comparable values in the range of the dependent variable. Best examples may be sinus and cosinus functions.

2DPlots_232.png

2DPlots_233.gif

Adding Tooltip,

2DPlots_234.gif

2DPlots_235.gif

Adding PlotRegion and PlotRange,

2DPlots_236.png

2DPlots_237.gif

About Dashing,

Dashing is a very advanced plot option for every distinguished plotted curves.
Dashing may be { 2DPlots_238.png

Dashing is evaluated as succession of {trace,leaveBlank} successions. If they are equally spaced, giving only one measure will suffice as Dashing[Tiny].

Dashing may be given as   { 2DPlots_239.png

Dashing[{}] means, no dash, just a solid curve as evaluated by default, therefore there is no need to state.

Adding PlotStyle,

2DPlots_240.png

2DPlots_241.gif

Adding PlotLegends (added by default after the plot) ( they are also labeled by tooltips). Plot legends may be placed at “Before”,”Above”,”Below” and “After” as ex. PlotLegends → Placed[{“sin(x)”,”cos(x)”,After]. If “After is the choice, it is the default value and stating PlotLegends→ Expressions” will suffice.

2DPlots_242.png

2DPlots_243.gif

Adding PlotLegends (Already visible by tooltips)

2DPlots_244.png

2DPlots_245.gif

Those were for individual plots, now we can state the option for the whole plot. For avoiding the whole program to be cluttered, we have chosen to add them separateley using Show[ ] function. Since now we have all the data about the individual plots as p1. We can now call Show [ ] function to display what we have in hand for the individual plots and add the new options about the whole plot.

2DPlots_246.png

2DPlots_247.gif

It is showing all the up to date options for the individual curves. These can not be reached from Show[ ].
Adding the image size for the whole curve.

2DPlots_248.png

2DPlots_249.gif

Adding background color (if it is wished as white, this the default color and no need to be given).

2DPlots_250.png

Adding axes. Axes may turn on by True, and off by False. If both will be True, there is no need to be stated since it is the default value.

2DPlots_252.png

2DPlots_253.gif

Adding AxesOrigin. Default is {0,0} if it is the choice there is no need to state explicitly.

2DPlots_254.png

2DPlots_255.gif

Adding PlotLabel,

2DPlots_256.png

2DPlots_257.gif

We will peserve all the options for giving a chance to alter them for a new user. Decorating the axes,

2DPlots_258.png

2DPlots_259.gif

Labeling axes,

2DPlots_260.png

2DPlots_261.gif

Well, the general impression is not favorable for the axes labeled at the end of the axes, so we will present another possibilities, either to frame all or place them with programming steps but if this plot is the final design the using ``Drawing Tools” is much faster for any one who is not willing to jump out to the deeper functions of the Mathematica. Any way we will continue by programming.

Axes Ticks,

2DPlots_262.png

2DPlots_263.gif

Grid Lines

2DPlots_264.png

2DPlots_265.gif

Configuring the grid lines,

2DPlots_266.png

2DPlots_267.gif

Framing the whole plot,

2DPlots_268.png

2DPlots_269.gif

Altering the image size,

2DPlots_270.png

2DPlots_271.gif

Last possibility is to work direcly with the plot, by using graphic primitives and without frames,

2DPlots_272.png

2DPlots_273.png

2DPlots_274.gif

2DPlots_275.gif

Usage of these plot templates

Problem :

Plot y = 2DPlots_276.png + 2DPlots_277.png where the domain of x will be [-10 , 10]. (University of Texas in Austin)

Solution :

It is strongly advisable to make a very basic plot of any function to be plotted, ther we can see what will its behavior and assess the domain and range intervals for a detailed plot.

2DPlots_278.png

2DPlots_279.png

2DPlots_280.png

2DPlots_281.gif

Well, it seems the is a second kind discontinuity at x=-10 and x=10. Let us see the limits :

2DPlots_282.png

2DPlots_283.png

2DPlots_284.png

2DPlots_285.png

We will also contol the value of the function in these pseudo asymptotic lines,

2DPlots_286.png

2DPlots_287.png

2DPlots_288.png

The results show that the function has no real asymptotes at the points x=-10 and x=10 . But there is no point to examine his domain beyond x=-10 and x=10 since the range evaluates to the extremely high values which are not representable by 2D x/y plots.

It is better to examine this function in the region [-5,5] :

2DPlots_289.png

2DPlots_290.gif

The function seems to have a root and inflexion point at x = 0. Let’s chek it :

2DPlots_291.png

2DPlots_292.png

Right, it has actually a root at x = 0. For the evaluation of the inflexion point we’ll leave for the detailed mathematical analysis. We will only try to plot this function.

Let us import one of the templates developed at this page and presented above and change the values according to our first observations of the given function.

2DPlots_293.png

2DPlots_294.png

2DPlots_295.png

2DPlots_296.png

2DPlots_297.png

Graphics

It has taken considerably less time for getting a presentable plot.

Problem :

2DPlots_299.png

Solution :

2DPlots_300.png

2DPlots_301.png

2DPlots_302.png

2DPlots_303.gif

2DPlots_304.png

2DPlots_305.gif

2DPlots_306.png

2DPlots_307.gif

2DPlots_308.png

2DPlots_309.gif

2DPlots_310.png

2DPlots_311.png

2DPlots_312.png

2DPlots_313.png

2DPlots_314.gif

2DPlots_315.png

Graphics

2DPlots_317.png

Graphics

2DPlots_319.png

Graphics

Just change the inputs with yours...

Last assays are near publication quality.

Mathematica has many other options to enhancing the plots. Here, we have only presented some of them, useful for having fully decorated plots.
Happy ploting...

>

N.B. : For the Mathematica notebook one should have desktop version of the latest version of Mathematica.

For the cdf version (Mathematica Computable Document Format comparable to pdf's but more advantageous to copy the including text) may be downloaded as a free cdf reader from the Wolfram web site.

For copy/paste actions rtf version may be suitable at best. This version may be downloaded and read by write.exe which is a standard and free rtf reader for windows. These documents may also read by Microsoft Word or equivalent free software.

Created with the Wolfram Language

Geçerli html5