author | bhanu |
Thu, 11 Nov 2010 02:16:07 +0530 | |
changeset 477 | 0406115dccd1 |
parent 470 | 41167d9f0d23 |
permissions | -rw-r--r-- |
319
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
1 |
.. Objectives |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
2 |
.. ---------- |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
3 |
|
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
4 |
.. At the end of this tutorial, you will be able to |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
5 |
|
353
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
6 |
.. 1. Save plots using ``savefig()`` function. |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
7 |
.. #. Save plots in different formats. |
319
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
8 |
|
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
9 |
|
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
10 |
.. Prerequisites |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
11 |
.. ------------- |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
12 |
|
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
13 |
.. 1. should have ``ipython`` and ``pylab`` installed. |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
14 |
.. #. getting started with ``ipython``. |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
15 |
.. #. using plot command interactively. |
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
16 |
|
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
17 |
.. Author : Anoop Jacob Thomas <anoop@fossee.in> |
368
fd3c10a3d234
made changes to savefig script after internal review.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
353
diff
changeset
|
18 |
Internal Reviewer : Puneeth |
319
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
19 |
External Reviewer : |
469 | 20 |
Language Reviewer : Bhanukiran |
470 | 21 |
Checklist OK? : <10-11-2010, Anand, OK> [2010-10-05] |
319
e8c02b3c51ac
changed headers of scripts(objectives and prerequisites).
Anoop Jacob Thomas<anoop@fossee.in>
parents:
290
diff
changeset
|
22 |
|
353
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
23 |
.. #[Puneeth: Quickref missing.] |
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
24 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
25 |
======= |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
26 |
Savefig |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
27 |
======= |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
28 |
|
290 | 29 |
{{{ Show the first slide }}} |
30 |
||
31 |
Hello and welcome to the tutorial saving plots. |
|
32 |
||
33 |
{{{ switch to next slide, outline slide }}} |
|
34 |
||
353
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
35 |
In this tutorial you will learn how to save plots using Python, saving |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
36 |
in different formats, and locating the file in the file system. |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
37 |
|
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
38 |
.. #[Puneeth: file-system is too technical.] |
290 | 39 |
|
40 |
{{{ switch to next slide, a sine wave}}} |
|
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
41 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
42 |
Start your IPython interpreter with the command :: |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
43 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
44 |
ipython -pylab |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
45 |
|
353
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
46 |
As you know, it will start your IPython interpreter with the required |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
47 |
python modules for plotting and saving your plots. |
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
48 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
49 |
{{{ Open ipython }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
50 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
51 |
Now let us plot something, let us plot a sine wave from minus 3 pi to |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
52 |
3 pi. Let us start by calculating the required points for the plot. It |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
53 |
can be done using linspace as, :: |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
54 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
55 |
x = linspace(-3*pi,3*pi,100) |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
56 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
57 |
We have stored required points in x. Now let us plot the points using |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
58 |
the statement :: |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
59 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
60 |
plot(x,sin(x)) |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
61 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
62 |
{{{ Keep the plot open }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
63 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
64 |
Done! we have made a very basic sine plot, now let us see how to save |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
65 |
the plot for future use so that you can embed the plot in your |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
66 |
reports. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
67 |
|
353
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
68 |
.. #[Puneeth: All this is known stuff. You don't have to elaborate so |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
69 |
.. much on it. Just say, let us plot sin function from -3 pi to 3 |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
70 |
.. pi. Show the commands, and be done with it. ] |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
71 |
|
290 | 72 |
{{{ switch to next slide, savefig() }}} |
73 |
||
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
74 |
{{{ Switch the focus to IPython interpreter window }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
75 |
|
290 | 76 |
For saving the plot, we will use ``savefig()`` function, and it has to be |
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
77 |
done with the plot window open. The statement is, :: |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
78 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
79 |
savefig('/home/fossee/sine.png') |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
80 |
|
353
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
81 |
Notice that ``savefig`` function takes one argument which is the |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
82 |
filename. The last 3 characters after the ``.`` in the filename is the |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
83 |
extension or type of the file which determines the format in which you |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
84 |
want to save. |
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
85 |
|
e13e3452c599
Reviewed savefig script.
Puneeth Chaganti <punchagan@gmail.com>
parents:
319
diff
changeset
|
86 |
.. #[Puneeth: removed mention of string] |
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
87 |
|
368
fd3c10a3d234
made changes to savefig script after internal review.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
353
diff
changeset
|
88 |
.. #[[Anoop: I think this treatment is better :) ]] |
fd3c10a3d234
made changes to savefig script after internal review.
Anoop Jacob Thomas<anoop@fossee.in>
parents:
353
diff
changeset
|
89 |
|
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
90 |
{{{ Highlight the /home/fossee part using mouse movements }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
91 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
92 |
Also, note that we gave the full path or the absolute path to which we |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
93 |
want to save the file. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
94 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
95 |
{{{ Highlight the .png part using mouse movements }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
96 |
|
469 | 97 |
Here I have used an extension ``.png`` which means I want to save the |
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
98 |
image as a PNG file. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
99 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
100 |
Now let us locate ``sine.png`` file saved. We saved the file to |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
101 |
``/home/fossee`` so let us navigate to ``/home/fossee`` using the |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
102 |
file browser. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
103 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
104 |
{{{ Open the browser, navigate to /home/fossee and highlight the file |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
105 |
sine.png }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
106 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
107 |
Yes, the file ``sine.png`` is here and let us check it. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
108 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
109 |
{{{ Open the file sine.png and show it for two-three seconds and then |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
110 |
close it and return to IPython interpreter, make sure the plot window |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
111 |
is still open, also don't close the file browser window }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
112 |
|
290 | 113 |
{{{ switch to next slide, More on savefig() }}} |
114 |
||
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
115 |
So in-order to save a plot, we use ``savefig`` function. ``savefig`` |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
116 |
can save the plot in many formats, such as pdf - portable document |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
117 |
format, ps - post script, eps - encapsulated post script, svg - |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
118 |
scalable vector graphics, png - portable network graphics which |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
119 |
support transparency etc. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
120 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
121 |
.. #[[slide must give the extensions for the files - Anoop]] |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
122 |
|
290 | 123 |
{{{ switch to next slide, exercise 1 }}} |
124 |
||
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
125 |
Let us now try to save the plot in eps format. ``eps`` stands for |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
126 |
encapsulated post script, and it can be embedded in your latex |
290 | 127 |
documents. Pause here and try to figure it out yourself. |
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
128 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
129 |
{{{ Switch focus to the already open plot window }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
130 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
131 |
We still have the sine plot with us, and now let us save the plot as |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
132 |
``sine.eps``. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
133 |
|
290 | 134 |
{{{ switch to next slide, solution 1 }}} |
135 |
||
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
136 |
{{{ Switch focus to IPython interpreter }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
137 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
138 |
Now, We will save the plot using the function ``savefig`` :: |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
139 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
140 |
savefig('/home/fossee/sine.eps') |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
141 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
142 |
{{{ Switch focus to file browser window }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
143 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
144 |
Now let us go to ``/home/fossee`` and see the new file created. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
145 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
146 |
{{{ Highlight the file sine.eps with a single mouse click for 2 |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
147 |
seconds and then double click and open the file }}} |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
148 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
149 |
Yes! the new file ``sine.eps`` is here. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
150 |
|
290 | 151 |
{{{ switch to next slide, exercise 2 }}} |
152 |
||
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
153 |
Now you may try saving the same in pdf, ps, svg formats. |
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
154 |
|
290 | 155 |
{{{ Switch to summary slide }}} |
156 |
||
157 |
This brings us to the end of this tutorial, in this tutorial we |
|
158 |
learned to save plots using the function ``savefig()``. Saving the |
|
159 |
plots in different formats and locating the files in the file system. |
|
160 |
||
161 |
{{{ switch to Thank you slide }}} |
|
261
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
162 |
|
c7f0069d698a
added base scripts and questions except for matrices and other-type-of-plots. previous commit only removed unwanted files.
anoop
parents:
diff
changeset
|
163 |
Thank you! |