Difference between revisions of "Gnuplot/C2/Example-scripts-and-demo-folder/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 1: Line 1:
'''[Title of script''': {{anchor|DdeLink25781167434169}} '''Example''' '''Scripts and demo folder'''
+
{|border=1
 +
||'''Visual Cue'''
 +
||'''Narration'''
  
'''Author: '''Rani Parvathy
+
|-
 +
| '''Slide Number 1'''
 +
'''Example Scripts and demo folder'''
  
'''Keywords:''' gnuplot, video tutorial, spoken tutorial, installation, set term, demo folder, example files, styles, scripts, script structure.
+
| Welcome to the tutorial on '''Example Scripts and Demo Folder'''
  
 +
|-
 +
|'''Slide Number 2'''
 +
'''Learning Objectives'''
  
 +
| In this tutorial, we will
  
{| style="border-spacing:0;width:6.8528in;"
+
* Familiarize with gnuplot
|-
+
* Familiarize with the demo folder of gnuplot and
! align=center style="background-color:#993366;border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | Visual Cue
+
* Familiarize with scripts, example files and the graphics interface
! align=center style="background-color:#993366;border:1pt solid #000000;padding:0.0382in;" | Narration
+
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 1'''</div>
+
  
<div style="color:#000000;">'''Title Slide '''</div><div style="color:#000000;">'''Example Scripts and demo folder'''</div>
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Welcome to the tutorial on '''Example Scripts and demo folder'''
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 2'''</div>
+
| '''Slide Number 3'''
 +
'''System and Software Requirement'''
  
<div style="color:#000000;">'''Learning Objectives'''</div>
+
| To record this tutorial, I am using,
  
 +
* Debian Linux 9 point three
 +
* gnuplot 5 point two point 5
 +
* Gedit text editor 3 point two two
 +
* Firefox web browser 52 point five
  
 +
It may work with other versions also.
  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">In this tutorial, we will </div>
+
|-
 +
| '''Slide Number 4'''
  
 +
'''Pre-requisites'''
  
* <div style="color:#000000;">Familiarize with '''gnuplot'''</div>
+
| To follow this tutorial, learners must be familiar with,  
* <div style="color:#000000;">Familiarize with '''demo''' folder of '''gnuplot''' </div><br/><div style="color:#000000;">and</div>
+
* <div style="color:#000000;">Familiarize with '''scripts''', example files and graphics interface</div>
+
  
 +
* Basic computer and internet skills
 +
* Working internet to access online script files and
 +
* Concept of graph, Mathematics knowledge
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 3'''</div>
+
|| '''Slide Number 5'''
  
<div style="color:#000000;">'''System and Software Requirement'''</div>
+
'''Download link'''
 +
|| Download link for gnuplot example files is gnuplot dot info
  
 +
Example Script files are downloaded in the tar ball
 +
They are extracted to the demo folder
  
 +
|-
 +
|| Press '''ctrl''' '''alt''' '''t''' keys together.
 +
|| First, open a terminal, by pressing '''control, alt, t''' keys together on keyboard.
  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">To record this tutorial, I am using</div>
+
|-
 +
|| '''cd ~/Downloads/gnuplot-5.2.5/demo'''
 +
|| A terminal opens.
  
 +
Change directory to the demo directory of the extracted tar ball.
 +
Enter command, as seen on the screen to change the directory.
  
<div style="color:#000000;">'''Debian Linux'''</div>
 
 
 
<div style="color:#000000;">'''gedit''' 3.22.0</div>
 
 
 
<div style="color:#000000;">and</div>
 
 
 
<div style="color:#000000;">'''Firefox''' web browser 52.5.0</div>
 
 
|-
 
|-
 +
||
 +
|| I have downloaded and extracted gnuplot files here.
  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 4'''</div>
 
 
<div style="color:#000000;">'''Pre-requisites'''</div>
 
 
 
<div style="color:#000000;"></div>
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">To follow this tutorial, learners must be familiar with, </div>
 
 
 
<div style="color:#000000;">Basic computer and internet skills</div>
 
 
 
<div style="color:#000000;">And have Concept of graph, Mathematics knowledge</div>
 
 
|-
 
|-
 +
||
 +
|| The example files are in the demo folder of the extracted tar ball.
 +
Learners must change directory to the demo folder in their computer.
  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 5'''</div>
 
 
<div style="color:#000000;">'''Download link'''</div>
 
 
 
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Download link for '''gnuplot''' example files is gnuplot dot info</div>
 
 
 
<div style="color:#000000;">Example Script files are downloaded in the tar ball </div>
 
 
 
<div style="color:#000000;">They get extracted to the '''demo''' folder</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Press ctrl, alt t keys together.
+
|| Hover mouse or highlight path in terminal
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | First, open a '''terminal''', by pressing '''control, alt, t''' keys together on keyboard.
+
|| Now working directory change to demo folder.
 +
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | A '''terminal''' opens.
+
|| There is a chance your computer does not have the demo files.
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | I have downloaded and extracted '''gnuplot''' files.
+
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">The example files are in the demo folder of the extracted tar ball.</div>
+
  
 
<div style="color:#000000;">Change directory to the '''demo''' directory of the extracted tar ball. </div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | '''cd ~/Downloads/gnuplot-5.2.5/demo'''
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Enter command, as seen on the '''screen''' to change the directory.</div>
+
|| If so, pause the video and download them from gnuplot website.
 
+
Extract the demo directory from the downloaded tar ball file.
  
<div style="color:#000000;">Learners must change directory to the demo folder in their computer.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
|| '''ls'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Now working directory change, to demo folder.
+
|| Enter command '''ls''' to list the files.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | There is a chance your computer does not have the demo files.
+
|| Notice, several files with '''dot''' '''dem''' extension.
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">If so, pause the video and download them from gnuplot website.</div>
+
 
+
  
<div style="color:#000000;">Extract the demo directory from the downloaded tar ball file.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | '''>ls'''
+
|| Scroll up
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Enter command ls to list the files.
+
|| They are simple text scripts, which are used to generate the plots
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
|| '''Ctrl alt k'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Notice, several files with '''dot''' '''dem''' extension.
+
|| I will also clear the screen for clarity in video
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | They are simple text scripts, which are used to generate plots
+
|| Demonstration files are short scripts that plot graphs
 +
Let's look at their structure now.
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | '''Ctrl - l'''
+
|| Type '''gedit simple.dem''' and press enter
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | I will also clear the screen for clarity in video with control l command.
+
|| Type '''gedit space simple dot dem''' and press enter
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | Demonstration files are short scripts that plot graphs
+
|| The script file opens in gedit.
 +
Windows users may open the file in notepad to study the structure of the script
  
 +
|-
 +
|| Hover mouse near required files in header.
 +
|| Details about this plot are mentioned in the header.
 +
The required data files are also mentioned.
 +
This script plots three functions together.
  
<div style="color:#000000;">Let's look at their structure now.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Type '''gedit simple.dem''' and press enter
+
|| Scroll down
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Type '''gedit simple dot dem''' and press enter
+
|| Scroll down to view the file.
|-
+
Now we have seen a script structure.  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">The script file opens in '''gedit'''</div>
+
 
+
  
<div style="color:#000000;">Windows users may open the file in '''notepad,''' to study the structure of script</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Point to header details.
+
|| Close '''gedit'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Details about this plot is mentioned in the header.</div>
+
|| Feel free to go through this file and explore more.
  
  
<div style="color:#000000;">The required data files is mentioned</div>
+
If you do not understand, please do not worry.
 +
You will learn about these later.
  
 +
Close '''gedit''' by clicking on the x sign
  
<div style="color:#000000;">Details on this plot is also mentioned in the header.</div>
+
|-
 +
||
 +
|| Next, let's run the script in gnuplot and generate the plot.
  
 +
|-
 +
|| '''>gnuplot'''
 +
Press enter
 +
|| In terminal prompt, type '''gnuplot''' and press enter to open '''gnuplot'''.
  
<div style="color:#000000;">This script plots three functions together.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Hover mouse next to left and right key in script
+
|| Hover mouse near gnuplot prompt
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Scroll down and notice that left and right arrow keys are also assigned
+
|| The plot changes to gnuplot prompt.
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Close '''gedit'''
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Now we have seen a script structure. </div>
+
  
 +
To execute a command in terminal, press enter.
 +
I will not mention it separately.
  
<div style="color:#000000;">Close '''gedit''' by clicking on ''''x'''' sign</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
|| ctrl shift K
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Next, let's run them in gnuplot and generate the plot.
+
|| I will clear the screen and bring prompt to top of the terminal for clarity.  
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">>qt</div>
+
  
<div style="color:#000000;">Press enter</div>
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Set terminal to '''qt'''.
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''>gnuplot'''</div>
+
|| '''>load space''' ''''simple.dem''''
 +
|| To load a script, enter command as seen.
  
<div style="color:#000000;">Press enter</div>
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">In terminal prompt, type '''gnuplot''' and press enter to open gnuplot.</div>
 
  
 +
We will run simple dot dem script.
 +
A graphical window opens.
  
<div style="color:#000000;">The prompt changes to gnuplot prompt.</div>
 
|-
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">To execute a command in terminal, press enter.</div>
 
  
 +
Click on the graphics window.
 +
|-
 +
|| Hover mouse next to '''Sin(x), atan(x) and cos(atan(x)) '''
 +
|| Three functions, s'''in x, atan x and cos atan x''' are plotted.
  
<div style="color:#000000;">I will not mention it separately.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | '''Ctrl + l'''
+
|| Scroll further in axis limits
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">I will clear the screen and bring prompt to top of the terminal for clarity. </div>
+
|| Using arrow keys, scroll, left, right, up and down in the plot.  
  
  
<div style="color:#000000;">Press '''control l''' on keyboard</div>
+
They allow the user to scroll further in the axis limits.
 +
This feature is enabled in the script file.
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | '''>load space''' ''''simple.dem''''
+
|| Hover mouse next to “'''press enter to continue'''” and press enter
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">To load a script, enter command as seen. </div>
+
|| Simple dot dem can plot many graphs.
 +
I encourage you to go through the script file again, at this stage.
 +
To see every new plot, do the following.
 +
Go to the terminal by clicking on it.
  
  
<div style="color:#000000;">We will run '''simple dot dem''' script.</div>
+
Hit return to continue in terminal, as seen in the prompt.
 +
From now on, you have to do this every time to get the next plot.
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Hover mouse next to '''Sin(x), atan(x) and cos(atan(x)) '''
+
|| Show the change in graphics window
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">This runs the script. A graphical window opens.</div>
+
|| Then next script and it's function gets plotted.
  
 +
|-
 +
|| Press enter
 +
|| Press enter again, as shown in prompt to plot the functions from next script.
  
<div style="color:#000000;">Three functions, s'''in x, atan x and cos atan x''' are plotted.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | The assigned arrow keys allow the user to scroll further in the axis limits.
+
|| You may pause the video and scroll over more demonstration files.
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Hover mouse next to “'''press enter to continue'''” and press enter
+
|| Close graphical window  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Now, follow prompt and '''press enter to continue''' in terminal
+
|| I will now close the graphical window  
|-
+
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Show the change in graphics window
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Then next script and it's function gets plotted.
+
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Press enter again, as shown in prompt to plot the functions from script.
+
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | You may pause the video and scroll over more demonstration files.
+
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | I will now close the graphical window  
+
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
|| Press '''ctrl c'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">We can also enter the commands sequentially in the terminal to generate plot.</div>
+
|| We can also enter the commands sequentially in the terminal to generate plot.
  
 +
I encourage you to try other demo files in this folder.
 +
 +
Press ctrl -c to come back to gnuplot prompt.
  
<div style="color:#000000;">Press '''control c''' to come back to gnuplot prompt.</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Press '''q'''
+
|| Press '''q'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Enter command, '''q''' or '''control c''' to exit gnuplot
+
|| Enter command, '''q''' to exit gnuplot
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Many example scripts are available online for '''gnuplot'''</div>
+
|| Many example scripts are available online for gnuplot
  
  
<div style="color:#000000;">First open a web browser.</div>
+
First open a web browser.
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | <span style="background-color:transparent;">I will</span><span style="background-color:transparent;"> </span><span style="background-color:transparent;">show how to access </span><span style="background-color:transparent;">the examples files</span><span style="background-color:transparent;"> </span><span style="background-color:transparent;">online</span><span style="background-color:transparent;"> in the next step.</span>
+
|| I will show how to access the examples files online in the next step.
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">Open web browser. </div>
+
|| Open web browser.  
 +
Go to, '''gnuplot.sourceforge.net/demo'''
 +
|| I will open firefox web browser.
 +
Go to, web address as seen in the video
  
  
<div style="color:#000000;">Go to, '''gnuplot.sourceforge.net/demo'''</div>
+
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">I will open firefox web browser. </div>
+
|| Scroll down and show
 +
|| Notice the several demos and scripts for users to learn from.
  
 +
|-
 +
|| Hover mouse over routine
 +
|| 2D and 3D graphs, histograms and curve fitting are few capabilities of software.
  
<div style="color:#000000;">Go to, web address '''gnuplot dot sourceforge dot net backslash demo'''</div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
|| Click on '''Simple functions'''
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Notice the several demos and scripts for users to learn from.
+
|| Click on the '''Simple functions''' link
 +
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
|| Hover mouse over graph, pan right
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | 2D and 3D graphs, histograms and curve fitting are few capabilities software.
+
|| Left side shows graphical plots.  
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" | Click on '''Simple functions'''
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Click on the '''Simple functions''' link
+
|-
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Left side shows graphical plots. </div>
+
  
 +
The simple scripts on the right side, generate the plots.
  
<div style="color:#000000;">The simple scripts on right side, generate the plots. </div>
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
+
|| Scroll down pan left
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Scroll down the page and notice the various styles in plots on the left side.  
+
|| Scroll down the page and notice the various styles in plots on the left side.  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Notice the variations in symbols, color, legends, line style and filling area.
 
|-
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Learners may use this page to learn the various commands and options
 
|-
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 6'''</div>
 
  
<div style="color:#000000;">'''Summary'''</div>
+
|| Hover mouse over graph
 
+
|| Notice the variations in symbols, color, legends, line style and filling area.
 
+
<div style="color:#000000;"></div>
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | Now let's summarize.  
+
  
 +
|-
 +
||
 +
|| Learners may use this page to learn the various commands and options
  
 +
|-
 +
|| '''Slide Number 6'''
 +
'''Summary'''
 +
|| Now let's summarize.
 
In this tutorial, we
 
In this tutorial, we
  
 
+
* Familiarized with gnuplot
* <div style="color:#000000;">Familiarized with gnuplot</div>
+
* Familiarized with examples files and the demo folder</span>
* <div style="color:#000000;"><span style="background-color:transparent;">Familiarize</span><span style="background-color:transparent;">d</span><span style="background-color:transparent;"> with </span><span style="background-color:transparent;">examples files and</span><span style="background-color:transparent;"> demo </span><span style="background-color:transparent;">folder</span></div>
+
* Familiarize with script files and the graphics interface</span>
* <div style="color:#000000;"><span style="background-color:transparent;">Familiarize with </span><span style="background-color:transparent;">script</span><span style="background-color:transparent;"> files and graphics interface</span></div>
+
  
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 7'''</div>
+
|| '''Slide Number 7'''
  
<div style="color:#000000;">'''Assignment'''</div>
+
'''Assignment'''
  
 +
|| For assignment activity, please do the following
  
 +
* Familiarize with example files in gnuplot
 +
* Familiarize with many types of plots, that gnuplot can generate
 +
* Familiarize with the help in user forum as seen in the link
  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | For assignment activity, please do the following
+
[http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html]
 +
|-
 +
|| '''Slide Number 8'''
  
 +
'''Assignment'''
  
* <div style="color:#000000;">Familiarize with more example files in gnuplot</div>
 
* <div style="color:#000000;">Familiarize with many types of plots, that gnuplot can generate</div>
 
* <div style="color:#000000;">Familiarize with help in user forum as seen in the link</div>
 
  
  
 
+
|| This is what this help page looks like.
<div style="color:#000000;">[http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html]</div>
+
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 8'''</div>
+
|| '''Slide Number 9'''
 +
'''Spoken Tutorial Project'''
  
<div style="color:#000000;">'''Spoken Tutorial Project'''</div>
+
|| This video summarises the Spoken Tutorial Project
 
+
Please download and watch it.
 
+
 
+
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <span style="color:#000000;">This video summarises the</span><span style="color:#000000;"> Spoken Tutorial Project </span>
+
 
+
 
+
<div style="color:#000000;">If you do not have good bandwidth, you may download and watch it.</div>
+
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 9'''</div>
+
|| '''Slide Number 10'''
  
<div style="color:#000000;">'''Spoken Tutorial workshops'''</div>
+
'''Spoken Tutorial workshops'''
  
 
+
|| The Spoken Tutorial Project Team  
 
+
* conducts workshops  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | The Spoken Tutorial Project Team * conducts workshops using spoken tutorials and
+
 
* gives certificates on passing online tests.  
 
* gives certificates on passing online tests.  
  
 +
For more details, please write to us.
  
 
For more details, please write to us.
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 10'''</div>
+
|| '''Slide Number 11'''
 +
'''Forum for specific questions:'''
 +
|| Post your timed queries in the forum.
  
<div style="color:#000000;">'''Forum for specific questions:'''</div>
 
 
 
 
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | Post your timed queries in the forum.
 
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;" | <div style="color:#000000;">'''Slide Number 11'''</div>
+
|| '''Slide Number 12'''
 
+
'''Acknowledgement'''>
<span style="color:#000000;">'''Acknowledgemen'''</span><span style="color:#000000;">t</span>
+
|| Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;" | <div style="color:#000000;">Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.</div>
+
 
+
 
+
  
 
|-
 
|-
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.0382in;color:#000000;" |  
+
||  
| style="background-color:#ffffff;border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.0382in;color:#000000;" | This is Rani from IIT, Bombay. Thank you for joining.
+
|| This is Rani from IIT, Bombay. Thank you for joining.
 
|-
 
|-
 
|}
 
|}
<div style="color:#000000;margin-left:0in;margin-right:0in;"></div>
 

Revision as of 16:19, 8 February 2019

Visual Cue Narration
Slide Number 1

Example Scripts and demo folder

Welcome to the tutorial on Example Scripts and Demo Folder
Slide Number 2

Learning Objectives

In this tutorial, we will
  • Familiarize with gnuplot
  • Familiarize with the demo folder of gnuplot and
  • Familiarize with scripts, example files and the graphics interface
Slide Number 3

System and Software Requirement

To record this tutorial, I am using,
  • Debian Linux 9 point three
  • gnuplot 5 point two point 5
  • Gedit text editor 3 point two two
  • Firefox web browser 52 point five

It may work with other versions also.

Slide Number 4

Pre-requisites

To follow this tutorial, learners must be familiar with,
  • Basic computer and internet skills
  • Working internet to access online script files and
  • Concept of graph, Mathematics knowledge
Slide Number 5

Download link

Download link for gnuplot example files is gnuplot dot info

Example Script files are downloaded in the tar ball They are extracted to the demo folder

Press ctrl alt t keys together. First, open a terminal, by pressing control, alt, t keys together on keyboard.
cd ~/Downloads/gnuplot-5.2.5/demo A terminal opens.

Change directory to the demo directory of the extracted tar ball. Enter command, as seen on the screen to change the directory.

I have downloaded and extracted gnuplot files here.
The example files are in the demo folder of the extracted tar ball.

Learners must change directory to the demo folder in their computer.

Hover mouse or highlight path in terminal Now working directory change to demo folder.
There is a chance your computer does not have the demo files.
If so, pause the video and download them from gnuplot website.

Extract the demo directory from the downloaded tar ball file.

ls Enter command ls to list the files.
Notice, several files with dot dem extension.
Scroll up They are simple text scripts, which are used to generate the plots
Ctrl alt k I will also clear the screen for clarity in video
Demonstration files are short scripts that plot graphs

Let's look at their structure now.

Type gedit simple.dem and press enter Type gedit space simple dot dem and press enter
The script file opens in gedit.

Windows users may open the file in notepad to study the structure of the script

Hover mouse near required files in header. Details about this plot are mentioned in the header.

The required data files are also mentioned. This script plots three functions together.

Scroll down Scroll down to view the file.

Now we have seen a script structure.

Close gedit Feel free to go through this file and explore more.


If you do not understand, please do not worry. You will learn about these later.

Close gedit by clicking on the x sign

Next, let's run the script in gnuplot and generate the plot.
>gnuplot

Press enter

In terminal prompt, type gnuplot and press enter to open gnuplot.
Hover mouse near gnuplot prompt The plot changes to gnuplot prompt.

To execute a command in terminal, press enter. I will not mention it separately.

ctrl shift K I will clear the screen and bring prompt to top of the terminal for clarity.
>load space 'simple.dem' To load a script, enter command as seen.


We will run simple dot dem script. A graphical window opens.


Click on the graphics window.

Hover mouse next to Sin(x), atan(x) and cos(atan(x)) Three functions, sin x, atan x and cos atan x are plotted.
Scroll further in axis limits Using arrow keys, scroll, left, right, up and down in the plot.


They allow the user to scroll further in the axis limits. This feature is enabled in the script file.

Hover mouse next to “press enter to continue” and press enter Simple dot dem can plot many graphs.

I encourage you to go through the script file again, at this stage. To see every new plot, do the following. Go to the terminal by clicking on it.


Hit return to continue in terminal, as seen in the prompt. From now on, you have to do this every time to get the next plot.

Show the change in graphics window Then next script and it's function gets plotted.
Press enter Press enter again, as shown in prompt to plot the functions from next script.
You may pause the video and scroll over more demonstration files.
Close graphical window I will now close the graphical window
Press ctrl c We can also enter the commands sequentially in the terminal to generate plot.

I encourage you to try other demo files in this folder.

Press ctrl -c to come back to gnuplot prompt.

Press q Enter command, q to exit gnuplot
Many example scripts are available online for gnuplot


First open a web browser.

I will show how to access the examples files online in the next step.
Open web browser.

Go to, gnuplot.sourceforge.net/demo

I will open firefox web browser.

Go to, web address as seen in the video


Scroll down and show Notice the several demos and scripts for users to learn from.
Hover mouse over routine 2D and 3D graphs, histograms and curve fitting are few capabilities of software.
Click on Simple functions Click on the Simple functions link
Hover mouse over graph, pan right Left side shows graphical plots.


The simple scripts on the right side, generate the plots.

Scroll down pan left Scroll down the page and notice the various styles in plots on the left side.
Hover mouse over graph Notice the variations in symbols, color, legends, line style and filling area.
Learners may use this page to learn the various commands and options
Slide Number 6

Summary

Now let's summarize.

In this tutorial, we

  • Familiarized with gnuplot
  • Familiarized with examples files and the demo folder</span>
  • Familiarize with script files and the graphics interface</span>


Slide Number 7

Assignment

For assignment activity, please do the following
  • Familiarize with example files in gnuplot
  • Familiarize with many types of plots, that gnuplot can generate
  • Familiarize with the help in user forum as seen in the link

http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html

Slide Number 8

Assignment


This is what this help page looks like.
Slide Number 9

Spoken Tutorial Project

This video summarises the Spoken Tutorial Project

Please download and watch it.

Slide Number 10

Spoken Tutorial workshops

The Spoken Tutorial Project Team
  • conducts workshops
  • gives certificates on passing online tests.

For more details, please write to us.

Slide Number 11

Forum for specific questions:

Post your timed queries in the forum.
Slide Number 12

Acknowledgement>

Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
This is Rani from IIT, Bombay. Thank you for joining.

Contributors and Content Editors

Madhurig, Ranipv076, Snehalathak