LON-CAPA Help
The gnuplot LON-CAPA tag allows an author to design a plot which will be
created programatically at the time when it is requested for display by a student.
This is intended for use in homework problems where a distinct plot should be
rendered for each student. It can be used in conjunction with a
script tag to generate curve data for random plots.
If you are using
static data a dynamically generated plot is not appropriate because of
the overhead associated with generating the plot. In that case, use a
picture (see "Adding Picture" section ).
The easiset way to create a template for a gnuplot tag is to use the colorful
problem editor, and select GnuPlot from the Insert dropdown menu.
Thereafter the boxes may be filled using this documentation to assist you. By default, only
the parent gnuplot tag and the child curve tag are created by
when the plot is inserted into a problem using the colorful editor. Other tags can be
added to decorate and polish your plot using the Insert: dropdown
provided by the colorful editor.
The following gnuplot parameters may be set:
- brief description of the plot
This text is used as the alt value of the img tag
used to display the plot on a web page.
- background color of image (xffffff)
See the "Color Selection" section
for help on specifying colors.
- foreground color of image (x000000)
See the "Color Selection" section
for help on specifying colors.
- height of image (pixels)
- width of image (pixels)
- Size of font to use "small", "medium", or "large".
The font used for any text on the plot is set with this tag.
- Transparent image "Yes" or "No".
If the image is transparent the background color will be ignored.
- Display grid "Yes" or "No".
- Number of samples for non-data plots If a function tag is used
(see "Plotting Functions" section ) to specify the
curve (see "Specifying Curves to Plot" section ),
this indicates the number of sample points to use.
- Draw border around plot "Yes" or "No"
- alignment for image in html "Left", "Center", or "Right".
This is the value used for the align parameter in the img
tag which embeds the plot in the problem.
- Width of plot when printed (mm) The width in mm of the plot when
it is printed. The default is approximately one half of a U.S. letter size
page, 93 mm.
- Font size to use in TeX output (pts) The size in points of text
on the graph when it is printed out.
- Plot type "Cartesian" or "Polar".
- margin width (pts) The left, right, top, or bottom margin width
measured in points.
- Size of major tic marks The size of the larger tic marks on the
plot border or axes, measured in graph units.
- Size of minor tic marks The size of the smaller tic marks on the
plot border or axes, measured in graph units.
The parent gnuplot tag allows use of the following child tags
(only the curve tag is added automatically when inserting with the colorful
editor):
- curve (see "Specifying Curves to Plot" section )
- title, xlabel, and ylabel (see "Plot Labels and Key" section
)
- key (see "Plot Labels and Key" section )
- label (see "Plot Labels and Key" section )
- axes (see "Plot Axes Details" section )
- tics (see "Plot Axes Details" section )