Skip to content

Commit

Permalink
Clarify the roles of xmin, xmax, ymin, ymax
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherwood committed Apr 30, 2011
1 parent fba5c9f commit 15a708f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/visual/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<p class="program"> from visual.graph import * # import graphing features
<br />
f1 = gcurve(color=color.cyan) # a graphics curve<br />
for x in arange(0, 8.1, 0.1): # x goes from 0 to 8<br />
for x in arange(0, 8.05, 0.1): # x goes from 0 to 8<br />
&nbsp;&nbsp;&nbsp;&nbsp;f1.plot(pos=(x,5*cos(2*x)*exp(-0.2*x))) # plot </p>
<p class="Normal">Importing from <span class="attribute">visual.graph</span> makes available all Visual objects plus the graph plotting module. The graph

Expand All @@ -136,7 +136,7 @@
<p class="Normal"> You can plot more than one thing on the same graph:</p>
<p class="program"> f1 = gcurve(color=color.cyan) <br />
f2 = gvbars(delta=0.05, color=color.blue)<br />
for x in arange(0., 8.1, 0.1): <br />
for x in arange(0., 8.05, 0.1): <br />
&nbsp;&nbsp;&nbsp;&nbsp;f1.plot(pos=(x,5*cos(2*x)*exp(-0.2*x))) &nbsp;# curve<br />
&nbsp;&nbsp;&nbsp;&nbsp;f2.plot(pos=(x,4*cos(0.5*x)*exp(-0.1*x)))# vbars</p>
<p class="Normal"><strong><font color="#0000A0">Special options for gcurve, gdots, gvbars, and ghbars</font></strong></p>
Expand Down Expand Up @@ -186,7 +186,7 @@

and the vertical axis will extend from -200 to +5000. <strong>Currently, xmin and ymin must

be negative; xmax and ymax must be positive.</strong></p>
be negative; xmax and ymax must be positive.</strong> If you specify xmax but not xmin, it is as though you had also specified xmin to be 0; similarly, if you specify xmin but not xmax, xmax will be 0. The same rule holds for ymax and ymin.</p>
<p class="Normal">If you simply say <span class="attribute">gdisplay()</span>, the defaults

are <span class="attribute">x=0</span>, <span class="attribute">y=0</span>, <span class="attribute">width=800</span>, <span class="attribute">height=400</span>,
Expand Down Expand Up @@ -230,7 +230,7 @@
.....<br />

agelist1<em class="code"> = </em>[5, 37, 12, 21, 8, 63, 52, 75, 7] <br />
ages = ghistogram(bins=arange(0, 80, 20), color=color.red) <br />
ages = ghistogram(bins=arange(0,80,20), color=color.red) <br />
ages.plot(data=agelist1) # plot the age distribution<br />
.....<br />
ages.plot(data=agelist2) # plot a different distribution</p>
Expand Down

0 comments on commit 15a708f

Please sign in to comment.