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
webComputing


Data Labeled Plot

<%Mathlet MSPSetDefault[$$funcType, "HeightList"] %> Choose data type :

>    {y1, y2, ...} plots y1, y2, ... at x values 1, 2, ..., labeling the points as 1, 2, ...

>    {{x1, y1}, {x2, y2} ,... } plots (x1, y1), (x2, y2), ... , labeling the points as 1, 2, ...

>    {{x1, y1, expr1}, {x2, y2, expr1}, ... } plots (x1, y1), (x2, y2), ... , labeling the points as expr1, expr2, ...

Enter a list of values for x :  
" >

Enter a list of values for y :
" >

Enter a list of labels :
" >

The lists must have equal dimensions.



<%Mathlet Needs["Graphics`Graphics`"]; %> <%Mathlet MSPBlock[ {$$funcType,$$nestlistX,$$nestlistY,$$nestlistL, $$frame, $$imageSize, $$plotLabel, $$fr1, $$fr2, $$fr3, $$fr4, $$xAxeLabel, $$yAxeLabel, $$rotateLabel, $$xAxeOrigin, $$yAxeOrigin, $$xAxe, $$yAxe, $$xTicks, $$yTicks, $$xGrids, $$yGrids, $$aspectRatio, $$rColor, $$gColor, $$bColor, $$rColorBackg, $$gColorBackg, $$bColorBackg, $$xRangeBeg, $$xRangeEnd, $$yRangeBeg, $$yRangeEnd }, d = ReleaseHold[MapAt[ToString, MapAt[HoldForm, HoldForm[$$nestlistL], Table[{1, i}, {i, Length[HoldForm[$$nestlistL][[1]]]}] ], Table[{1, i}, {i, Length[ HoldForm[$$nestlistL][[1]]]}] ] ]; For[i = 1, i <= Length[d], If[Part[d, i] === "Null", Part[d, i]= ""]; i++]; If[ Length[$$nestlistX] > 0 && ($$funcType =!= PointList || (Length[$$nestlistX] === Length[$$nestlistY])) && ($$funcType =!= LabeledList || (Length[$$nestlistX] === Length[$$nestlistY] === Length[$$nestlistL])), l1={}; l2={}; For[ i=1, i<=Length[$$nestlistX], l1=Append[l1,{Part[$$nestlistX,i],Part[$$nestlistY,i]}]; l2=Append[l2,{Part[$$nestlistX,i],Part[$$nestlistY,i],Part[ToString[HoldForm[#]]& /@ d, i]}]; i++ ]; Switch[ $$funcType, HeightList, l=$$nestlistX, PointList, l=l1, LabeledList, l=l2 ]; result = LabeledListPlot[ l, AspectRatio-> If[$$aspectRatioFlag === "Specified" , $$aspectRatio, 1/GoldenRatio], Axes->{$$xAxe,$$yAxe}, AxesLabel->{ If[$$xAxeLabel === Null, "", ToString[HoldForm[$$xAxeLabel]]], If[$$yAxeLabel === Null, "", ToString[HoldForm[$$yAxeLabel]]]}, AxesOrigin->If[$$axesOriginFlag === "Specified",{$$xAxeOrigin,$$yAxeOrigin}, Automatic], Background->If[{$$rColorBackg,$$gColorBackg,$$bColorBackg} =!= {"","",""}, RGBColor[$$rColorBackg,$$gColorBackg,$$bColorBackg], Automatic], DefaultColor->If[{$$rColor,$$gColor,$$bColor} =!= {"","",""}, RGBColor[$$rColor,$$gColor,$$bColor], Automatic], 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]]]}, GridLines->{If[$$xGridsFlag === "Specified", $$xGrids, MSPToExpression[$$xGridsFlag]], If[$$yGridsFlag === "Specified" , $$yGrids, MSPToExpression[$$yGridsFlag]]}, ImageSize->If[NumberQ[$$imageSize],$$imageSize,Automatic], PlotLabel-> If[$$plotLabel === Null, "", ToString[HoldForm[$$plotLabel]]], PlotRange->{If[$$xPlotRange === "Specified", {$$xRangeBeg,$$xRangeEnd}, MSPToExpression[$$xPlotRange]], If[$$yPlotRange === "Specified",{$$yRangeBeg,$$yRangeEnd}, MSPToExpression[$$yPlotRange]]}, RotateLabel->$$rotateLabel, Ticks->{If[$$xTicksFlag === "Specified" , $$xTicks, MSPToExpression[$$xTicksFlag]], If[$$yTicksFlag === "Specified" , $$yTicks, MSPToExpression[$$yTicksFlag]]} ]; If[Head[result] === Graphics, MSPShow[result] ], "The lists must have equal length!" ] ] %> <%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 : 

With file name :   " >



General options

Plot range : (All - all points are included, Automatic - outlying points are dropped).
If some labels cannot be seen, you should specify a bigger plot range.

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 label :  " >   y label :  " >

<%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 :   > True   > False

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   > 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.


Plot color (RGB color) :  red part :  " >   green part :  " >   blue part :  " >
Specifies the default color to be used for axes, frames and bounds of the figure. 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 webComputing,   Scientific Visualization