# HG changeset patch # User Nishanth # Date 1285241264 -19800 # Node ID 8bc4f7b3e038c1af2db0be8703731b59276e7bc0 # Parent bd7338e6728934e322aa4ebd097a33d8b19a54fd# Parent 4c2ee10366524c841bbca3f527093ba6d5283c00 Merged changes diff -r 4c2ee1036652 -r 8bc4f7b3e038 multiple-plots.rst --- a/multiple-plots.rst Thu Sep 23 16:49:48 2010 +0530 +++ b/multiple-plots.rst Thu Sep 23 16:57:44 2010 +0530 @@ -114,7 +114,7 @@ commands:: x = linspace(-5, 5, 100) - plot(x, 4 * (x ^ 2), 'b') + plot(x, 4 * (x * x), 'b') plot(x, (2 * x) + 3, 'g') Now we can use the legend command as:: @@ -146,8 +146,8 @@ {{{ Switch to plot window }}} -Now we have two plots, a sine plot and a cosine plot one overlaid upon -the other. +Now we have two plots, a sine plot and a cosine plot in two different +figures. .. #[Nishanth]: figure(1) and figure(2) give two different plots. The remaining script moves on the fact that they @@ -217,9 +217,9 @@ figure(2) annotate('x-intercept', xy=(0, 3)) annotate('y-intercept', xy=(0, -1.5)) - savefig('plot2.png') + savefig('/home/fossee/plot2.png') figure(1) - savefig('plot1.png') + savefig('/home/fossee/plot1.png') At times we run into situations where we want to compare two plots and in such cases we want to draw both the plots in the same plotting @@ -241,7 +241,7 @@ in this case we have 2 so it spilts the plotting area horizontally for two subplots. The second argument specifies the number of coloumns of subplots that must be created. We passed 1 as the argument so the -plotting area won't be split horizontally and the last argument +plotting area won't be split vertically and the last argument specifies what subplot must be created now in the order of the serial number. In this case we passed 1 as the argument, so the first subplot that is top half is created. If we execute the subplot command as