diff options
author | Amit Sethi | 2010-04-05 19:33:24 +0530 |
---|---|---|
committer | Amit Sethi | 2010-04-05 19:33:24 +0530 |
commit | e8811aa196a9de6f3396bed38e006406954adee7 (patch) | |
tree | 2e7d0ec179e194a5f5cfa7159b9ecf99771726fc /basic-plot.txt | |
parent | e176201f94bf5c88f0bf836363b10fd776f03aab (diff) | |
download | st-scripts-e8811aa196a9de6f3396bed38e006406954adee7.tar.gz st-scripts-e8811aa196a9de6f3396bed38e006406954adee7.tar.bz2 st-scripts-e8811aa196a9de6f3396bed38e006406954adee7.zip |
Encorporated changes based on comments by reviewers
Diffstat (limited to 'basic-plot.txt')
-rw-r--r-- | basic-plot.txt | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/basic-plot.txt b/basic-plot.txt index bd54067..a509be4 100644 --- a/basic-plot.txt +++ b/basic-plot.txt @@ -162,7 +162,7 @@ In []: close() close() now closes the figure(2). In []: close() -The plot command takes the parameters such as 'g' which generates the plot in green color. +The plot command can take the parameters such as 'g' which generates the plot in green color. Passing the linewidth=2 option to plot, generates the plot with linewidth of two units. Use Up arrow to get to the previous commands @@ -175,24 +175,40 @@ In []: plot(x, sin(x), '.') In []: clf() -In order to plot filled circles in black color you can pass 'ko' parameter to plot -In []: plot(x, cos(x), 'ko') - -In []: clf() - -A plot using dashed lines can be generated by passing the '--' parameter -In []: plot(x, sin(x), '--') You may look at more options related to colors and type of lines using plot?(question mark) +quit the documentation using Plot. + In []: clf() and finally to close the plot In []: close() - +In this tutorial You learned + +Ipython Features +Tab for autocompletion. +function? to look at documention +q to quit documentation. +escapping from ... prompt using Ctrl -C +quitting ipython using Ctrl-D + +The functions and commands you learnt were : +print for outping things +linspace to create equally space points +plot to get a plot +xlabel to label x-axis of plot +ylabel to label y-axis of plot +title to title a plot +legend for placing appropriate legend +annotating a plot +saving a plot +multiple plots using figure +clearing plots using clf() +and last closing plot using close() **************** -This brings us to the end of this tutorial. Thank you for attending this first tutorial on Python for Scientific Computing +This brings us to the end of this tutorial. Thank you for attending this on Python for Scientific Computing .Hope you enjoyed it and found it useful. **************** |