functionplot

Displays a plot with selected variables using OMPlot.

Information

Returns true on success.

Example command sequences:

  • simulate(A); plot({x,y,z});
  • simulate(A); plot(x, externalWindow=true);
  • simulate(A,fileNamePrefix="B"); simulate(C); plot(z,fileName="B.mat",legendPosition=none);

Inputs

TypeNameDefaultDescription
VariableNamesvarsThe variables you want to plot
BooleanexternalWindowfalseOpens the plot in a new plot window
StringfileName"<default>"The filename containing the variables. <default> will read the last simulation result
Stringtitle""This text will be used as the diagram title.
Stringgrid"simple"Sets the grid for the plot i.e simple, detailed, none.
BooleanlogXfalseDetermines whether or not the horizontal axis is logarithmically scaled.
BooleanlogYfalseDetermines whether or not the vertical axis is logarithmically scaled.
StringxLabel"time"This text will be used as the horizontal label in the diagram.
StringyLabel""This text will be used as the left vertical label in the diagram.
Real[2]xRange{0.0, 0.0}Determines the horizontal interval that is visible in the diagram. {0,0} will select a suitable range.
Real[2]yRange{0.0, 0.0}Determines the left vertical interval that is visible in the diagram. {0,0} will select a suitable range.
RealcurveWidth1.0Sets the width of the curve.
IntegercurveStyle1Sets the style of the curve. SolidLine=1, DashLine=2, DotLine=3, DashDotLine=4, DashDotDotLine=5, Sticks=6, Steps=7.
StringlegendPosition"top"Sets the POSITION of the legend i.e left, right, top, bottom, none.
BooleanautoScaletrueUse auto scale while plotting.
BooleanforceOMPlotfalseif true launches OMPlot and doesn't call callback function even if it is defined.
StringyAxis"L"Sets the variable to be plotted on the left (L) or right (R) y-axis.
StringyLabelRight""This text will be used as the right vertical label in the diagram.
Real[2]yRangeRight{0.0, 0.0}Determines the right vertical interval that is visible in the diagram. {0,0} will select a suitable range.

Outputs

TypeNameDefaultDescription
BooleansuccessReturns true on success