File:  [LON-CAPA] / loncom / html / adm / help / tex / Authoring_Dynamic_Plot_Gnuplot.tex
Revision 1.9: download - view: text, annotated - select for diffs
Mon Sep 9 20:59:44 2013 UTC (10 years, 11 months ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, version_2_11_5_msu, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0, HEAD
- Section titles in double quotes.

    1: \label{Authoring_Dynamic_Plot_Gnuplot}
    2: 
    3: \index{gnuplot}\index{plot}\index{dynamic plot}
    4: The \textbf{gnuplot} LON-CAPA tag allows an author to design a plot which will be
    5: created programatically at the time when it is requested for display by a student. 
    6: This is intended for use in homework problems where a distinct plot should be 
    7: rendered for each student.  It can be used in conjunction with a 
    8: \textbf{script} tag to generate curve data for random plots.
    9: If you are using
   10: static data a dynamically generated plot is not appropriate because of
   11: the overhead associated with generating the plot. In that case, use a
   12: picture (see ``Adding Picture'' section \ref{Authoring_Adding_Pictures}).
   13: 
   14: The easiset way to create a template for a gnuplot tag is to use the colorful 
   15: problem editor, and select \textbf{GnuPlot} from the \textbf{Insert} dropdown menu. 
   16: Thereafter the boxes may be filled using this documentation to assist you. By default, only
   17: the parent \textbf{gnuplot} tag and the child \textbf{curve} tag are created by 
   18: when the plot is inserted into a problem using the colorful editor. Other tags can be 
   19: added to decorate and polish your plot using the \textbf{Insert:} dropdown 
   20: provided by the colorful editor.
   21: 
   22: The following \textbf{gnuplot} parameters may be set:
   23: 
   24: \begin{itemize}
   25: \item \texttt{brief description of the plot} 
   26: This text is used as the \texttt{alt} value of the \texttt{img} tag 
   27: used to display the plot on a web page.
   28: 
   29: \item \texttt{background color of image (xffffff)}
   30: See the ``Color Selection'' section \ref{Authoring_Dynamic_Plot_Color_Selection}
   31: for help on specifying colors.
   32: 
   33: \item \texttt{foreground color of image (x000000)} 
   34: See the ``Color Selection'' section \ref{Authoring_Dynamic_Plot_Color_Selection}
   35: for help on specifying colors.
   36: 
   37: \item \texttt{height of image (pixels)}
   38: 
   39: \item \texttt{width of image (pixels)}
   40: 
   41: \item \texttt{Size of font to use} ``small'', ``medium'', or ``large''.  
   42: The font used for any text on the plot is set with this tag.
   43: 
   44: \item \texttt{Transparent image} ``Yes'' or ``No''.  
   45: If the image is transparent the background color will be ignored.
   46: 
   47: \item \texttt{Display grid} ``Yes'' or ``No''.  
   48: 
   49: \item \texttt{Number of samples for non-data plots}  If a \textbf{function} tag is used
   50: (see ``Plotting Functions'' section \ref{Authoring_Dynamic_Plot_Curve_Function}) to specify the
   51: \textbf{curve} (see ``Specifying Curves to Plot'' section \ref{Authoring_Dynamic_Plot_Curve}), 
   52: this indicates the number of sample points to use.
   53: 
   54: \item \texttt{Draw border around plot} ``Yes'' or ``No''
   55: 
   56: \item \texttt{alignment for image in html} ``Left'', ``Center'', or ``Right''.
   57: This is the value used for the \texttt{align} parameter in the \texttt{img} 
   58: tag which embeds the plot in the problem.
   59: 
   60: \item \texttt{Width of plot when printed (mm)} The width in mm of the plot when
   61: it is printed.  The default is approximately one half of a U.S. letter size 
   62: page, 93 mm.
   63: 
   64: \item \texttt{Font size to use in TeX output (pts)} The size in points of text
   65: on the graph when it is printed out.
   66: 
   67: \item \texttt{Plot type} ``Cartesian'' or ``Polar''.  
   68: 
   69: \item \texttt{margin width (pts)} The left, right, top, or bottom margin width
   70: measured in points.
   71: 
   72: \item \texttt{Size of major tic marks} The size of the larger tic marks on the
   73: plot border or axes, measured in graph units.
   74: 
   75: \item \texttt{Size of minor tic marks} The size of the smaller tic marks on the
   76: plot border or axes, measured in graph units.
   77: 
   78: \end{itemize}
   79: 
   80: The parent \texttt{gnuplot} tag allows use of the following child tags 
   81: (only the \textbf{curve} tag is added automatically when inserting with the colorful
   82: editor):
   83: 
   84: \begin{itemize}
   85: \item \textbf{curve} (see ``Specifying Curves to Plot'' section \ref{Authoring_Dynamic_Plot_Curve})
   86: \item \textbf{title}, \textbf{xlabel}, and \textbf{ylabel} (see ``Plot Labels and Key'' section 
   87: \ref{Authoring_Dynamic_Plot_Title_X_Y_Label})
   88: \item \textbf{key}   (see ``Plot Labels and Key'' section \ref{Authoring_Dynamic_Plot_Key})
   89: \item \textbf{label} (see ``Plot Labels and Key'' section \ref{Authoring_Dynamic_Plot_Label}) 
   90: \item \textbf{axes}  (see ``Plot Axes Details'' section \ref{Authoring_Dynamic_Plot_Axes})
   91: \item \textbf{tics}  (see ``Plot Axes Details'' section \ref{Authoring_Dynamic_Plot_Tics})
   92: \end{itemize}
   93: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>