summaryrefslogtreecommitdiff
path: root/basic-plot.txt
diff options
context:
space:
mode:
authorSantosh G. Vattam2010-04-08 15:00:28 +0530
committerSantosh G. Vattam2010-04-08 15:00:28 +0530
commitbbd1565a8e7625c49cc3de08b20acbeefd2ec352 (patch)
tree80e94f7988f8e6bf77febca4cc3cf2642f8ba0e0 /basic-plot.txt
parenta24fa30391fbed60bb6703527b11dccee6817c48 (diff)
downloadst-scripts-bbd1565a8e7625c49cc3de08b20acbeefd2ec352.tar.gz
st-scripts-bbd1565a8e7625c49cc3de08b20acbeefd2ec352.tar.bz2
st-scripts-bbd1565a8e7625c49cc3de08b20acbeefd2ec352.zip
Added xlim and ylim.
Diffstat (limited to 'basic-plot.txt')
-rw-r--r--basic-plot.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/basic-plot.txt b/basic-plot.txt
index e40c011..ff3fa2b 100644
--- a/basic-plot.txt
+++ b/basic-plot.txt
@@ -96,6 +96,14 @@ In []: annotate('origin', xy=(0, 0))
The first argument is the comment string and second one is the position for it.
+As you can see, the boundary along the x-axis extends after the graph and there is an ugly blank space left on the right. Also along the y-axis, the sine plot in fact is cut by the boundary. We want to make the graph fit better. For this we shall use xlim() and ylim() to set the boundaries on the figure.
+
+In []: xlim(0, 2*pi)
+
+In []: ylim(-1.2, 1.2)
+
+The first value passed is the lower limit and the second is the upper limit. Hence when we do xlim(0, 2*pi) the boundary is set from x-value 0 to x-value 2*pi. Similarly for the y-axis.
+
Ok, what do I do with all this effort . I obviously have to save it .
We save the plot by the function savefig