[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Authoring_Dynamic_Plot_Axes.tex Authoring_Dynamic_Plot_Curve.tex Authoring_Dynamic_Plot_Curve_Data.tex Authoring_Dynamic_Plot_Curve_Function.tex Authoring_Dynamic_Plot_Gnuplot.tex Authoring_Dynamic_Plot_Key.tex Authoring_Dynamic_Plot_Label.tex Authoring_Dynamic_Plot_Linestyle.tex Authoring_Dynamic_Plot_Tics.tex Authoring_Dynamic_Plot_Title_X_Y_Label.tex
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 22 Sep 2003 19:54:36 -0000
This is a MIME encoded message
--matthew1064260476
Content-Type: text/plain
matthew Mon Sep 22 15:54:36 2003 EDT
Added files:
/loncom/html/adm/help/tex Authoring_Dynamic_Plot_Axes.tex
Authoring_Dynamic_Plot_Curve.tex
Authoring_Dynamic_Plot_Curve_Data.tex
Authoring_Dynamic_Plot_Curve_Function.tex
Authoring_Dynamic_Plot_Gnuplot.tex
Authoring_Dynamic_Plot_Key.tex
Authoring_Dynamic_Plot_Label.tex
Authoring_Dynamic_Plot_Linestyle.tex
Authoring_Dynamic_Plot_Tics.tex
Authoring_Dynamic_Plot_Title_X_Y_Label.tex
Log:
New plot help.
--matthew1064260476
Content-Type: text/plain
Content-Disposition: attachment; filename="matthew-20030922155436.txt"
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Axes.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Axes.tex
\label{Authoring_Dynamic_Plot_Axes}
The \textbf{Plot Axes} tag allows you to specify the domain and range of the
data to display. It is closely tied with the \textbf{Plot Ticks}
\ref{Authoring_Dynamic_Plot_Tics} tags, which specify where the gridlines are
drawn on the plot. The \textbf{Plot Axes} tag sets the following parameters:
\textbf{The color of grid lines}
If the ``Display Grid'' parameter of the
Gnuplot tag is set to yes, the grid will be displayed in the specified color.
Hexadecimal notation is used to specify the color
\ref{Authoring_Dynamic_Plot_Color_Selection}.
\textbf{The view of the graph shown}
The viewing rectangle of the graph is set with the following parameters:
\begin{itemize}
\item minimum x-value
\item maximum x-value
\item minimum y-value
\item maximum y-value
\end{itemize}
See also Plot Ticks \ref{Authoring_Dynamic_Plot_Tics} and the general Gnuplot
help \ref{Authoring_Dynamic_Plots_Gnuplot}.
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Curve.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Curve.tex
\label{Authoring_Dynamic_Plot_Curve}
The \textbf{curve} tag is where you set the data to be plotted by gnuplot.
The following parameters may be set:
\begin{itemize}
\item color of curve
The color of the curve on the plot. See \textbf{Selecting Colors}
\ref{Authoring_Dynamic_Plot_Color_Selection}.
\item name of curve to appear in key
If a key is present, the name of the curve will appear with a sample of its
line type.
\item line style
See the section on line styles \ref{Authoring_Dynamic_Plot_Linestyle} for
more information about the available line styles and their data requirements.
\item point type
This parameter may not apply to all linestyles.
\item point size
This parameter may not apply to all linestyles. The size of the points, in
pixels, present on the line. Some point types are not affected by this
parameter.
\end{itemize}
There are two ways of entering the information to be plotted, which are
accessed using the subtags of \textbf{curve}, \textbf{data}
\ref{Authoring_Dynamic_Plot_Curve_Data} and \textbf{function}
\ref{Authoring_Dynamic_Plot_Curve_Function}.
\end{itemize}
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Curve_Data.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Curve_Data.tex
\label{Authoring_Dynamic_Plot_Curve_Data}
The \textbf{data} tag is used to specify the values plotted in the
\textbf{gnuplot} \ref{Authoring_Dynamic_Plot_Gnuplot} tag.
The \textbf{data} tag is only used in the \textbf{Curve}
\ref{Authoring_Dynamic_Plot_Curve} tag.
The data must be either a perl array, \textt{@X}, or a comma seperated list,
such as ``0.5,0.9,1.5, 2.4'' (without quotes). 'NaN' is a valid value.
The function and number \textbf{data} tags required varies based on the
line style \ref{Authoring_Dynamic_Plot_Linestyle} chosen for the
curve. In all cases the first \textbf{data} tag will hold the ``X'' values
and the second will hold the ``Y'' values.
All of the data sets in the \textbf{data} tag must have the same number of
elements.
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Curve_Function.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Curve_Function.tex
\label{Authoring_Dynamic_Plot_Curve_Function}
The \textbf{function} tag allows you to specify the curve to be
plotted as a formula, instead of numerical data.
The function must be a mathematical expression/
Use the independent variable ``x'' for cartesian plots and ``t'' for polar
plots.
Implicit multiplication is not accepted by Gnuplot.
The following are examples of valid functions and invalid functions:
\begin{itemize}
\item \texttt{sin(x)}
\item \texttt{sin(2*x)}
\item \texttt{sin(x**2)}
\item \texttt{exp(x)}
\item \texttt{3*x**x}
\item \texttt{exp(sin(2*x))}
\item \texttt{sinh(x)}
\item \texttt{sin(t)*cos(t)} \textit{polar plot}
\end{itemize}
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Gnuplot.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Gnuplot.tex
\label{Authoring_Dynamic_Plot_Gnuplot}
The \textbf{gnuplot} tag allows an author to design a plot which is created
when it is viewed. This is intended for use in homework problems
where each student needs to see a distinct plot. It can be used in
conjunction with a \textbf{script} tag to generate random plots.
The following parameters may be set:
\begin{itemize}
\item \texttt{brief description of the plot}
This text is used as the \texttt{alt} parameter of the \texttt{img} tag
used to embed the plot.
\item \texttt{background color of image (xffffff)}
See the section on color selection \ref{Authoring_Dynamic_Plot_Color_Selection}
for help on specifying colors.
\item \texttt{foreground color of image (x000000)}
See the section on color selection \ref{Authoring_Dynamic_Plot_Color_Selection}
for help on specifying colors.
\item \texttt{height of image (pixels)}
\item \texttt{width of image (pixels)}
\item \texttt{Size of font to use} ``small'', ``medium'', or ``large''.
The font used for any text on the plot is set with this tag.
\item \texttt{Transparent image} ``Yes'' or ``No''.
If the image is transparent the background color will be ignored.
\item \texttt{Display grid} ``Yes'' or ``No''.
\item \texttt{Number of samples for non-data plots} If a \textbf{function}
\ref{Authoring_Dynamic_Plot_Curve_Function} tag is used to specify the
\textbf{curve} \ref{Authoring_Dynamic_Plot_Curve}, this indicates the number
of sample points to use.
\item \texttt{Draw border around plot} ``Yes'' or ``No''
\item \texttt{alignment for image in html} ``Left'', ``Center'', or ``Right''.
This is the value used for the \texttt{align} parameter in the \texttt{img}
tag which embeds the plot in the problem.
\item \texttt{Width of plot when printed (mm)}
\item \texttt{Plot type:} ``Cartesian'' or ``Polar''.
\end{itemize}
The \textbf{gnuplot} tag allows the use of the the following tags:
\begin{itemize}
\item \textbf{curve} \ref{Authoring_Dynamic_Plot_Curve}
\item \textbf{key} \ref{Authoring_Dynamic_Plot_Key}
\item \textbf{label} \ref{Authoring_Dynamic_Plot_Label}
\item \textbf{title} \ref{Authoring_Dynamic_Plot_Linestyle}
\item \textbf{axes} \ref{Authoring_Dynamic_Plot_Axes}
\item \textbf{tics} \ref{Authoring_Dynamic_Plot_Tics}
\item \textbf{title}, \textbf{xlabel}, and \textbf{ylabel}
\ref{Authoring_Dynamic_Plot_Title_X_Y_Label}
\end{itemize}
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Key.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Key.tex
\label{Authoring_Dynamic_Plot_Key}
The \textbf{key} tag causes a key to be drawn on the plot when it is generated.
The key will contain an entry for each \textbf{curve}
\ref{Authoring_Dynamic_Plot_Curve} which has a name.
The key is the color of the foreground of the plot, specified in the
\textbf{gnuplot} \ref{Authoring_Dynamic_Plot_Gnuplot} tag.
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Label.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Label.tex
\label{Authoring_Dynamic_Plot_Label}
The \textbf{label} tag allows the author to place text at any position on the
plot. There may be many \textbf{label} tags on one plot and all will show.
The color used will be to foreground color of the plot and the font will be
the size specified for the plot, both of which are set in the
\textbf{gnuplot} \ref{Authoring_Dynamic_Plot_Gnuplot} tag.
\item \texttt{justification of the label text on the plot}
``left'', ``right'', or ``center''.
\item \texttt{x position of label (graph coordinates)}
\item \texttt{y position of label (graph coordinates)}
The text to be placed on the plot must be entered as well.
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Linestyle.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Linestyle.tex
\label{Authoring_Dynamic_Plot_Linestyle}
Unless otherwise noted the linestyles require only 2 data sets, X and Y.
\begin{itemize}
\item \textbf{lines} Connect adjacent points with straight line segments.
\item \textbf{points} Display a small marker at each point.
\item \textbf{linespoints} Draw both \textbf{lines} and \textbf{points}.
Draws a small symbol at each point and then connects adjacent points with
straight line segments.
\item \textbf{dots} Place a tiny dots on the given points.
\item \textbf{steps} Connect points with horizontal lines.
This style connects consecutive
points with two line segments: the first from (x1,y1) to (x2,y1) and the
second from (x2,y1) to (x2,y2).
\item \textbf{fsteps} Connect data with horizontal lines.
This style connects consecutive
points with two line segments: the first from (x1,y1) to (x1,y2) and the
second from (x1,y2) to (x2,y2).
\item \textbf{histeps} Plot as histogram.
Y-values are assumed to be centered at the x-values;
the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to
((x1+x2)/2,y1). The lines representing the end points are extended so that
the step is centered on at x. Adjacent points are connected by a vertical
line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).
\item \textbf{errorbars} Same as yerrorbars.
\item \textbf{xerrorbars} Draw horizontal error bars around the points.
Requires 3 or 4 data sets. Either X, Y, Xdelta or X, Y, Xlower, Xupper.
Xdelta is a change relative to the given X value. The Xlower and Xupper
values are absolute grid coordinates of the upper and lower values to
indicated with error bars.
\item \textbf{yerrorbars} Draw vertical error bars around the points.
Requires 3 or 4 data sets. Either X, Y, Ydelta or X, Y, Ylower, Yupper.
Ydelta is a change relative to the given Y value. The Ylower and Yupper
values are the grid coordinates of the upper and lower values to
indicate with error bars.
\item \textbf{xyerrorbars} Draw both vertical and horizontal error bars
around the points.
Requires 4 or 6 data sets. Either X, Y, Xdelta, Ydelta or
X, Y, Xlower, Xupper, Ylower, Yupper. Xdelta and Ydelta are relative to
the given coordinates. Xlower, Xupper, Ylower, and Yupper are the grid
coordinates of the upper and lower values to indicate with the error bars.
\item \textbf{boxes} Draw a box from the X-axis to the Y-value given.
Requires either 2 or
3 data sets. Either X, Y or X, Y, Xwidth. In the first case the boxes
will be drawn next to eachother. In the latter case Xwidth indicates the
horizontal width of the box for the given coordinate.
\item \textbf{vector} Draws a vector field based on the given data.
Requires 4 data sets, X, Y, Xdelta, and Ydelta.
The `vector` style draws a vector from (X,Y) to (X+Xdelta,Y+Ydelta).
It also draws a small arrowhead at the end of the vector. May not be
fully supported by gnuplot.
\end{itemize}
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex
\label{Authoring_Dynamic_Plot_Tics}
The \textbf{xtics} and \textbf{ytics} tags can be inserted by selecting
the \textbf{Plot tics} item from the insert selection list of the
\textbf{gnuplot} tag.
The \textbf{xtics} and \textbf{ytics} tags have identical structure and the
description presented here applies to both.
The tics tags allow specification of the following parameters:
\begin{itemize}
\item \texttt{Location of major tic marks}
Tic marks can be placed on the border or on the axes. The images below
illustrate the effects of each of these options.
\includegraphics[ width=0.80\paperwidth]{Authoring_Dynamic_Plot_Axis_Tics_border}
\includegraphics[ width=0.80\paperwidth]{Authoring_Dynamic_Plot_Axis_Tics_x_axis}
\item \texttt{Mirror tics on opposite axis?}
``Yes'' or ``No''.
If the \textbf{location of tic marks} is set to ``border'' this parameter
determines if they are shown on both the top and bottom or right and left
sides of the graph. The ``mirror'' tic marks are unlabelled.
\includegraphics[ width=0.80\paperwidth]{Authoring_Dynamic_Plot_Axis_Tics_border}
\includegraphics[ width=0.80\paperwidth]{Authoring_Dynamic_Plot_Axis_Tics_nomirror}
\item \texttt{Start major tics at}
The point in graph coordinates which to start making major tics.
This may be less than or greater than the lower limit for the axis.
\item \texttt{Place a major tic every}
The span, in graph coordinates, between each major tic mark.
\item \texttt{Stop major tics at}
This may be less than or greater than the upper limit for the axis.
\item \texttt{Number of minor tics between major tic marks}
The number of subdivisions to make of the span between major tic marks.
Using a value of ``10'' leads to 9 minor tic marks. The example below
uses a value of ``5'' to produce 4 tic marks.
\includegraphics[ width=0.80\paperwidth]{Authoring_Dynamic_Plot_Axis_Tics_minor}
\end{itemize}
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Title_X_Y_Label.tex
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Title_X_Y_Label.tex
\label{Authoring_Dynamic_Plot_Title_X_Y_Label}
Three of the more basic tags are \textbf{title}, \textbf{xlabel}, and
\textbf{ylabel}. Their size and color depend on the values chosen for the
font size and graph foreground color specified in the \textbf{gnuplot}
\ref{Authoring_Dynamic_Plot_Gnuplot} tag. The figure below shows the locations
of the various labels.
\includegraphics[width=0.80\paperwidth]{Authoring_Dynamic_Plot_Title_X_Y_Label}
--matthew1064260476--