2D Functions
Function Plot
Parametric Plot
Multiple Parametric Plot
Filled Plot
Multiple Filled Plot
Logarithmic Plot
2D Data Plots
Data Plot
Data Error Plot
Data Logarithmic Plot
Data Labeled Plot
Contour & Density Plots
Contour Plot
Density Plot
Level Curves
3D Functions
3D Function Plot
3D Parametric Plot
3D Multiple Parametric Plot
3D Vector Field
3D Gradient Field
Shadow 3D Function
3D Data Plots
Contour 3D Data Plot
Density 3D Data Plot
Special Plots
Vector Field
Bar Charts
Pie Chart
Zonotope Show
Links
About This Site
Citation & Credits
Sci.Vis. Tutorials
web
C
omputing
Plot of Function
Enter a function of
x
:
" >
Plot Range :
" > < = x < =
" >
<%Mathlet MSPBlock[{$$func,$$xBeg,$$xEnd,$$xAxe,$$yAxe,$$xAxeOrigin,$$yAxeOrigin,$$xAxeLabel, $$yAxeLabel,$$xTicks,$$yTicks,$$frame,$$rotateLabel,$$xGrids,$$yGrids, $$plotLabel,$$aspectRatio,$$plotPoints, $$fr1, $$fr2, $$fr3, $$fr4, $$xRangeBeg, $$xRangeEnd, $$yRangeBeg, $$yRangeEnd, $$imageSize, $$rColor, $$gColor, $$bColor, $$rColorBackg, $$gColorBackg, $$bColorBackg}, result = Plot[$$func, {x, $$xBeg, $$xEnd}, PlotRange->{If[$$xPlotRange === "Specified",{$$xRangeBeg,$$xRangeEnd}, MSPToExpression[$$xPlotRange]], If[$$yPlotRange === "Specified",{$$yRangeBeg,$$yRangeEnd}, MSPToExpression[$$yPlotRange]]}, AspectRatio->If[$$aspectRatioFlag === "Specified",$$aspectRatio, MSPToExpression[$$aspectRatioFlag]], Axes->{$$xAxe,$$yAxe}, PlotLabel-> If[$$plotLabel === Null, "", ToString[HoldForm[$$plotLabel]]], AxesOrigin->If[$$axesOriginFlag === "Specified" , {$$xAxeOrigin, $$yAxeOrigin}, Automatic], AxesLabel->{If[$$xAxeLabel === Null, "", ToString[HoldForm[$$xAxeLabel]]], If[$$yAxeLabel === Null, "", ToString[HoldForm[$$yAxeLabel]]]}, Ticks->{If[$$xTicksFlag === "Specified", $$xTicks, MSPToExpression[$$xTicksFlag]], If[$$yTicksFlag === "Specified", $$yTicks, MSPToExpression[$$yTicksFlag]]}, Frame->$$frame, FrameLabel->{If[$$fr1 === Null, "", ToString[HoldForm[$$fr1]]], If[$$fr2 === Null, "", ToString[HoldForm[$$fr2]]], If[$$fr3 === Null, "", ToString[HoldForm[$$fr3]]], If[$$fr4 === Null, "", ToString[HoldForm[$$fr4]]]}, RotateLabel->$$rotateLabel, GridLines->{If[$$xGridsFlag === "Specified", $$xGrids, MSPToExpression[$$xGridsFlag]], If[$$yGridsFlag === "Specified", $$yGrids, MSPToExpression[$$yGridsFlag]]}, PlotLabel->If[$$plotLabel === Null, "", ToString[HoldForm[$$plotLabel]]], DefaultColor->If[{$$rColor,$$gColor,$$bColor} =!= {"","",""}, RGBColor[$$rColor,$$gColor,$$bColor], Automatic], Background-> If[{$$rColorBackg,$$gColorBackg,$$bColorBackg} =!= {"","",""}, RGBColor[$$rColorBackg,$$gColorBackg,$$bColorBackg], Automatic], ImageSize-> If[NumberQ[$$imageSize],$$imageSize,Automatic], PlotPoints->$$plotPoints ]; If[Head[result] === Graphics, MSPShow[result]] ] %> <%Mathlet MSPBlock[{$$fname, $$submitButton1}, c = If[$$fname === Null, "", ToString[$$fname] ]; ftype = Switch[$$opt, "jpg", "JPEG", "tif", "TIFF", "eps", "EPSTIFF", "xbm", "XBitmap", "mps", "MPS", _ , $$opt]; If[Head[result] === Graphics, MSPReturn[DisplayString[result, ftype], "image/"<>ftype , c<>"."<>$$opt] ] ] %>
Save as:
> GIF and animated GIF (.gif)
>JPEG (.jpeg)
>JPEG (.jpg)
> Encapsulated PostScript (.eps)
> Mathematica abbreviated PostScript (.mps)
> Adobe Acrobat portable document format (.pdf)
> Microsoft bitmap format (.bmp)
> Encapsulated PostScript with device independent preview (.epsi)
> Encapsulated PostScript with TIFF preview (.eps)
> Mathematica independent raster graphics format (.mgf)
> Portable bitmap format (.pbm)
>TIFF (.tif)
>TIFF (.tiff)
> X window system bitmap (.xbm)
With file name:
" >
General options
Plot range:
(All - all points are included, Automatic - outlying points are dropped)
X:
<%Mathlet MSPSetDefault[$$xPlotRange, "Automatic"] %>
> Automatic
> All
> Specified
" > < = x < =
" >
Y:
<%Mathlet MSPSetDefault[$$yPlotRange, "Automatic"] %>
> Automatic
> All
> Specified
" > < = y < =
" >
<%Mathlet MSPSetDefault[$$xAxe, "True"] %> <%Mathlet MSPSetDefault[$$yAxe, "True"] %>
Axes :
X :
> True
> False Y :
> True
> False
<%Mathlet MSPSetDefault[$$axesOriginFlag, "Automatic"] %>
Axes origin :
> Automatic
> Specified X :
" > Y :
" >
Axes labels :
X :
" > Y :
" >
<%Mathlet MSPSetDefault[$$xTicksFlag, "Automatic"] %> <%Mathlet MSPSetDefault[$$yTicksFlag, "Automatic"] %>
Ticks :
Whether to draw tick marks if there are axes. You may specify the positions at which ticks will be drawn.
X :
> Automatic
> None
> Specified :
" >
(list of values)
Y :
> Automatic
> None
> Specified :
" >
(list of values)
<%Mathlet MSPSetDefault[$$xGridsFlag, "None"] %> <%Mathlet MSPSetDefault[$$yGridsFlag, "None"] %>
GridLines :
Whether to draw gridlines. You may specify the positions at which gridlines will be drawn.
X :
> None
> Automatic
> Specified :
" >
(list of values)
Y :
> None
> Automatic
> Specified :
" >
(list of values)
<%Mathlet MSPSetDefault[$$frame, "False"] ;%>
Frame :
 
> False  
> True
Frame labels :
Frame label down:
" > Frame label left:
" >
Frame label up:
" > Frame label right:
" >
<%Mathlet MSPSetDefault[$$rotateLabel, "True"] %>
Rotate labels :
> True
> False
(whether to allow text in frame labels to be vertically positioned)
Plot label:
" >
<%Mathlet MSPSetDefault[$$aspectRatioFlag, "1/GoldenRatio"] %>
Aspect ratio :
> Default
> Automatic
> Specified :
" >
Setting the AspectRatio option changes the whole shape of your plot. AspectRatio gives the ratio of height to width.
Its
default
value is the inverse of the Golden Ratio — supposedly the most pleasing shape for a rectangle.
Automatic
determines the shape of the display area from the original coordinate system.
<%Mathlet MSPSetDefault[$$plotPoints, "25"] %>
Plot points :
" >
(The minimum number of points at which to sample the function)
Plot color (RGB color):
red part :
" > green part :
" > blue part :
" >
The values of the color parts must be between 0 and 1.
Background (RGB color):
red part :
" > green part :
" > blue part :
" >
Image size:
">
specifies that the image should have a width of x printer's points
 
© 2004 web
C
omputing, Scientific Visualization