[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Authoring_Dynamic_Plot.tex Authoring_Dynamic_Plot_Tics.tex

foxr foxr at source.lon-capa.org
Fri Aug 3 06:56:52 EDT 2012


foxr		Fri Aug  3 10:56:52 2012 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Authoring_Dynamic_Plot.tex 
                             	Authoring_Dynamic_Plot_Tics.tex 
  Log:
  BZ5635 - Document the new <tic> tag.
  
  
  
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot.tex
diff -u loncom/html/adm/help/tex/Authoring_Dynamic_Plot.tex:1.2 loncom/html/adm/help/tex/Authoring_Dynamic_Plot.tex:1.3
--- loncom/html/adm/help/tex/Authoring_Dynamic_Plot.tex:1.2	Tue Sep 14 22:04:42 2004
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot.tex	Fri Aug  3 10:56:52 2012
@@ -130,3 +130,40 @@
 \end{verbatim}
 
 \includegraphics{dynamic_plot2}
+
+It is also possible to override the attributes of the <xtics > and <ytics > by
+nesting <tic > tags inside those tags.   For each <tic > tag, the ``location''
+attribute allows you to specify the location of the tic mark and the contents
+of the tag allow you to specify the tic mark label.  The following
+fragment of XML demonstrates an X axis that is labeled with the monthos of
+the year.  Note that the ``rotate'' attribute of the <xtics > tag will rotate
+the text of the tic marks if the output device supports rotated text:
+
+\begin{verbatim}
+...
+<gnuplot ...
+
+<xtics rotate='on'>
+   <tic location='1'>January</tic>
+   <tic location='2'>February</tic>
+   <tic location='3'>March</tic>
+   <tic location='4'>April</tic>
+   <tic location='5'>May</tic>
+   <tic location='6'>June</tic>
+   <tic location='7'>July</tic>
+   <tic location='8'>August</tic>
+   <tic location='9'>September</tic>
+   <tic location='10'>October</tic>
+   <tic location='11'>November</tic>
+   <tic location='12'>December</tic>
+</xtics>
+<ytics end="6.0" location="border" start="-6.0" 
+       increment="1.0" mirror="on" />
+
+...
+</gnuplot>
+
+\end{verbatim}
+
+The values of location can be arbitrary and need not even be at regular
+intervals.
Index: loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex
diff -u loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex:1.3 loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex:1.4
--- loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex:1.3	Tue Oct 21 19:06:37 2003
+++ loncom/html/adm/help/tex/Authoring_Dynamic_Plot_Tics.tex	Fri Aug  3 10:56:52 2012
@@ -7,7 +7,7 @@
 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:
+The tics tags allow specification of the following attributes:
 
 \begin{itemize}
 
@@ -49,4 +49,47 @@
 
 \includegraphics[  width=0.40\paperwidth]{Authoring_Dynamic_Plot_Axis_Tics_minor}
 
+
+\item \texttt{rotate}
+
+For output devices that support it, the \texttt{rotate=`1'} attribute rotates
+the tic label.  This is most useful with large lables defined by the
+\textbf{tic} tag described below.
+
 \end{itemize}
+
+In addition to specifying regular tic intervals via the attributes of the
+\textbf{xtics} and \textbf{ytics} you can specify arbitrary tic locations
+by enclosing \textbf{tic} tags within the body of these tags.  Each
+\textbf{tic} tag requires the \textbf{location} attribute which specifies the
+location of a tic on the axis.  The body of the tag contains the label of
+that tic.
+
+The \textbf{xtic} or \textbf{ytic}  \texttt{rotate} attribute can rotate
+the label text if the output device supports text rotation.
+If \textbf{tic} tags are embedded within the \textbf{xtic} or \textbf{ytic}
+tags attributes of those tags that specify tic boundaries and interval are
+ignored.  Here's an example of an X axis tic specification in months of the year:
+
+\begin{verbatim}
+...
+<xtics rotate='on'>
+   <tic location='1'>January</tic>
+   <tic location='2'>February</tic>
+   <tic location='3'>March</tic>
+   <tic location='4'>April</tic>
+   <tic location='5'>May</tic>
+   <tic location='6'>June</tic>
+   <tic location='7'>July</tic>
+   <tic location='8'>August</tic>
+   <tic location='9'>September</tic>
+   <tic location='10'>October</tic>
+   <tic location='11'>November</tic>
+   <tic location='12'>December</tic>
+</xtics>
+<ytics end="6.0" location="border" start="-6.0" 
+       increment="1.0" mirror="on" />
+\end{verbatim}
+
+Note that tic locations are completely under your control and do not even have
+to be at regular interevals on the axis if that better suits your needs.




More information about the LON-CAPA-cvs mailing list