Blame view

site/jpgraph/docs/chunkhtml/ch35s03s02.html 2.76 KB
d72ac078   Guillaume   Ajout graphe V1.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Getting the grid lines right</title><link rel="stylesheet" type="text/css" href="manual.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.0"><link rel="home" href="index.html" title="JpGraph Manual"><link rel="up" href="ch35s03.html" title="The Init() method"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Getting the grid lines right</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center">The Init() method</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="section" title="Getting the grid lines right"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2622113"></a>Getting the grid lines right</h2></div></div></div>
                  
                  <p>Since we want some discrete horizontal grid lines we might think that it is
                      enough to do the normal</p>
                  <p>
                      </p><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1
  </pre></td><td class="hl-main" valign="top"><pre><span class="hl-code">$graph-&gt;ygrid-&gt;Show();</span></pre></td></tr></table></div><p>
                  </p>
                  <p>However, doing that will not show any grid lines. The reason is hat by default
                      the grid lines are drawn at the bottom of the plot. Since we have filled area
                      plots covering 100% of the pot area no grid lines would show. In order to change
                      this we need to move the grid line to the front with a call to the method</p>
                  <p>
                      </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
                              <p><code class="code">Graph::SetGridDepth($aDepth)</code></p>
                          </li></ul></div><p>
                  </p>
                  <p>using the argument <code class="code">DEPTH_FRONT</code>. The rest of the grid line
                      formatting is just basic style and color modification to make the grid visible
                      but just barely.</p>
              </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"><a accesskey="u" href="ch35s03.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>