Advanced plotting


You can use many options with your functions to specify exactly how the functions should work. Here is a list of all options available.

PlotJoined Whether to draw lines between the sample points.
PlotFilled Whether to fill the area between the plot and the x-axis with a color.
PlotPoints The number of points to make the plot from.
PlotColor The color of the plot.
FillColor The color to use when PlotFilled is active.
PlotRange Specifies the visible area of the plot.
DottRadius The radius of the points that will be placed at each sample point.
Axes Whether to draw the axes
AxesStyle Whether to use axes of a frame.
AxesOrigin Specifies the origin of the axes.
AxesColor Specifies the color of the axes.
Ticks Specifies the ticks of the axes.
Grid Whether to draw a grid line at each tick.
Mesh Whether to draw a mesh.
ColorFunction Whether to use hue or grayscale to visualize the z value.
BrushSize The size in pixels of the brush to draw the plots with.
ZRatio The ratio between the x and y values and the z value. (Only used in 3D)

2D Options

This changes the plot color to blue.

When you set an option you must use "->" This is because we want to separate options from variables (to set a variable use "=")
We set PlotColor to {0,0,255} this is the RGB value for blue. It works like this, the first value is the amount of red, the second the amount of green and the last the amount of blue. For each one of these colors you can choose an integer from zero to 255. By combine this three colors you can make any color, for example {0,0,0} is black, {255,255,255} is white, {255,255,0} is yellow and {255,180,0} is orange.
This method to set colors are also used in the options FillColor and AxesColor.

If you want to use more than one options you separate them with "|" like this.

This is very important to remember because if you use "," it will not work and no warning message will be displayed either.

Whenever you plot a function, Eudox will try to scale the function right, so you will get the best view of it. While this works very well in general, it may sometimes give undesirable result, especially when ploting functions with singularities. This plots tan(x) in the interval -Pi to Pi. Note that tan(x) has singularities, in this case two singular points. The first one at -Pi/2 and the second at Pi/2.

If Eudox does not scale the function right you can use the option PlotRange to specify the visible area of the plot.

This plots the function sin(1/x)

The plot looks a bit strange between -0.25 and 0.25. This is because the default value for how many plot points to use is to low. This plots the same plot but with PlotPoints set to 5000.

This plot is more correct but it takes more time to calculate.

When you plot several functions and want to use individual options on the functions, you do like this. This plots two functions with some different plot options.

Here are two plots. The first is one with the option AxesStyle set to Axes (default) and the second to Frame.

As you can see PlotStyle set to Frame looks much better on this specific plot.

This fills the area between the plot and the x-axis with a color.

This change the fill color to red.

If you want to draw the plot again you use the function Show[]. For more information how to use Show[] go to "visualize data" under the chapter "basic data handling".
This displays the last plot you did (in this case the one that we filled with red color).

Notice that only the graph is displayed (no fill color) and that the axes is now displayed as a frame. This is because only the function-values from the last plot are stored in "%" and AxesStyle is set to Frame by default with Show[]

Density Options

This makes a density plot of function z=sin(x*y) in two different ways. The first one with ColorFunction set to GrayLevel (standard value) and the second one to Hue.

The second plot can be difficult to understand at the first look. It works like this: the color represents the z value, where red is max. After red comes pink, blue, light blue, green, yellow, orange and finally red again. To use red for both the maximum and minimum value is very good because you use all colors available to represent your values.

If you don't want to show the black grid (mesh) in the plot you can turn in off by the Mesh option. This plots the same function but with Mesh set to False.

As you can see it doesn't look that nice. We recommend that if you set Mesh to False you should set PlotPoints to a high value.
This plots the same function but uses a high value for PlotPoints.

3D Options

This plots two functions, the fist one is x^2+y^2 and the second one is 3*(x^2+y^2).

As you can see there is no difference! It seems like the multiplication by 3 didn't hade any effect in the second plot. This is because Eudox scales the plot so that you will always get a good view of the function. However, if you would like to change the ratio between the z axis and the x, y axes you can use the option ZRatio. ZRatio has default value 0.333 This plots the same functions as above but with ZRatio set to 1.

Note that even though you set ZRatio to 1 the two functions will look the same. So if you would like to show the difference you would have to use ZRatio set to 0.333 at the first and ZRatio set to 1 at the second.

Next: Basic data handling

Table of contents