<commit_before><chapter id="simple">
  <title>Simple Use of PLplot</title>
  
  <sect1 id="simple-graph">
    <title>Plotting a Simple Graph</title>
    
    <para>
      We shall first consider plotting simple graphs showing the dependence
      of one variable upon another.  Such a graph may be composed of
      several elements:
    </para>
    <itemizedlist>
      <listitem>
	<para>
	  A box which defines the ranges of the variables, perhaps with
	  axes and numeric labels along its edges.
	</para>
      </listitem>
      <listitem>
	<para>
	  A set of points or lines within the box showing the functional
	  dependence.
	</para>
      </listitem>
      <listitem>
	<para>
	  A set of labels for the variables and a title for the graph.
	</para>
      </listitem> 
    </itemizedlist>
    <para>
      In order to draw such a graph, it is necessary to call at least four
      of the PLplot functions:
    </para>
    
    <orderedlist>
      <listitem>
	<para>
	  &plinit;, to initialize PLplot.
	</para>
      </listitem>
      <listitem>
	<para>
	  &plenv;, to define the range and scale of the
	  graph, and draw labels, axes, etc.
	</para>
      </listitem>
      <listitem>
	<para>
	  One or more calls to &plline; or &plpoin; to draw lines or points
	  as needed.  Other more complex routines include &plbin; and
	  &plhist; to draw histograms, &plerrx; and &plerry; to draw
	  error-bars.
	</para>
      </listitem>
      <listitem>
	<para>
	  &plend;, to close the plot.
	</para>
      </listitem>
    </orderedlist>
    
    <para>
      More than one graph can be drawn on a single set of axes by making
      repeated calls to the routines listed in item 3 above.  PLplot only
      needs to be initialized once unless plotting to multiple output
      devices.
    </para>
    
  </sect1>
  
  <sect1 id="initializing">
    <title>Initializing PLplot</title>
    
    <para>
      Before any actual plotting calls are made, a graphics program must
      call &plinit;, is the main initialization routine for PLplot.  It
      sets up all internal data structures necessary for plotting and
      initializes the output device driver.  If the output device has not
      already been specified when &plinit; is called, a list of valid
      output devices is given and the user is prompted for a choice.
      Either the device number or a device keyword is accepted.
    </para>
    
    <para>
      There are several routines affecting the initialization that must be
      called <emphasis>before</emphasis> &plinit;, if they are used.  The
      function &plsdev; allows you to set the device
      explicitly.  The function &plsdev; may be called
      to divide the output device plotting area into several subpages of
      equal size, each of which can be used separately.<commit_msg>Tweak.  plsdev ==> plssub which is the correct cross-reference from the context.<commit_after><chapter id="simple">
  <title>Simple Use of PLplot</title>
  
  <sect1 id="simple-graph">
    <title>Plotting a Simple Graph</title>
    
    <para>
      We shall first consider plotting simple graphs showing the dependence
      of one variable upon another.  Such a graph may be composed of
      several elements:
    </para>
    <itemizedlist>
      <listitem>
	<para>
	  A box which defines the ranges of the variables, perhaps with
	  axes and numeric labels along its edges.
	</para>
      </listitem>
      <listitem>
	<para>
	  A set of points or lines within the box showing the functional
	  dependence.
	</para>
      </listitem>
      <listitem>
	<para>
	  A set of labels for the variables and a title for the graph.
	</para>
      </listitem> 
    </itemizedlist>
    <para>
      In order to draw such a graph, it is necessary to call at least four
      of the PLplot functions:
    </para>
    
    <orderedlist>
      <listitem>
	<para>
	  &plinit;, to initialize PLplot.
	</para>
      </listitem>
      <listitem>
	<para>
	  &plenv;, to define the range and scale of the
	  graph, and draw labels, axes, etc.
	</para>
      </listitem>
      <listitem>
	<para>
	  One or more calls to &plline; or &plpoin; to draw lines or points
	  as needed.  Other more complex routines include &plbin; and
	  &plhist; to draw histograms, &plerrx; and &plerry; to draw
	  error-bars.
	</para>
      </listitem>
      <listitem>
	<para>
	  &plend;, to close the plot.
	</para>
      </listitem>
    </orderedlist>
    
    <para>
      More than one graph can be drawn on a single set of axes by making
      repeated calls to the routines listed in item 3 above.  PLplot only
      needs to be initialized once unless plotting to multiple output
      devices.
    </para>
    
  </sect1>
  
  <sect1 id="initializing">
    <title>Initializing PLplot</title>
    
    <para>
      Before any actual plotting calls are made, a graphics program must
      call &plinit;, is the main initialization routine for PLplot.  It
      sets up all internal data structures necessary for plotting and
      initializes the output device driver.  If the output device has not
      already been specified when &plinit; is called, a list of valid
      output devices is given and the user is prompted for a choice.
      Either the device number or a device keyword is accepted.
    </para>
    
    <para>
      There are several routines affecting the initialization that must be
      called <emphasis>before</emphasis> &plinit;, if they are used.  The
      function &plsdev; allows you to set the device
      explicitly.  The function &plssub; may be called
      to divide the output device plotting area into several subpages of
      equal size, each of which can be used separately.
{'fraction_non_alphanumeric': 0.07369713984909633, 'fraction_numerical': 0.0014037550447446921, 'mean_word_length': 2.5625, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 110, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5599172', 'n_tokens_mistral': 1686, 'n_tokens_neox': 1614, 'n_words': 743}