Gnuplot/C2/Example-scripts-and-demo-folder/English

From Script | Spoken-Tutorial
Revision as of 16:55, 3 December 2018 by Ranipv076 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[Title of script: Template:Anchor Example Scripts and demo folder

Author: Rani Parvathy

Keywords: gnuplot, video tutorial, spoken tutorial, installation, set term, demo folder, example files, styles, scripts, script structure.


Visual Cue Narration
Slide Number 1
Title Slide
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 demo folder of gnuplot

    and
  • Familiarize with scripts, example files and graphics interface


Slide Number 3
System and Software Requirement


To record this tutorial, I am using


Debian Linux


gedit 3.22.0


and


Firefox web browser 52.5.0
Slide Number 4
Samson Microphone
To record audio, I am using Samson USB portable microphone was used.


The model number SAGOMIC


I bought it from amazon website, for about rupees four thousand


It may be available in other websites also.
Slide Number 5
Pre-requisites


To follow this tutorial, learner's must be familiar with,


Basic computer and internet skills


And have Concept of graph, Mathematics knowledge
Slide Number 6
Pre-requisites


Please locate this tutorial on our web page, spoken hyphen tutorial dot org


Prerequisite spoken tutorials, if any, will be mentioned in this page
Slide Number 7
Download link


Download link for gnuplot example files is gnuplot dot info


Example Script files are downloaded in the tar ball


They get extracted to the demo folder
Press ctrl, alt t keys together. First, open a terminal, by pressing control, alt, t keys together on keyboard.
A terminal opens.
I have downloaded and extracted gnuplot files.
The example files are in the demo folder of the extracted tar ball.


Change directory to the demo directory of the extracted tar ball.
cd ~/Downloads/gnuplot-5.2.5/demo
Enter command, as seen on the screen to change the directory.


Learners must change directory to the demo folder in their computer.
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.
They are simple text scripts, which are used to generate plots
Ctrl - l I will also clear the screen for clarity in video with control l command.
Demonstration files are short scripts that plot graphs


Let's look at their structure now.
Type gedit simple.dem and press enter Type gedit 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 script
Point to header details.
Details about this plot is mentioned in the header.


The required data files is mentioned


Details on this plot is also mentioned in the header.


This script plots three functions together.
Hover mouse next to left and right key in script Scroll down and notice that left and right arrow keys are also assigned
Close gedit
Now we have seen a script structure.


Close gedit by clicking on 'x' sign
Next, let's run them in gnuplot and generate the plot.
>qt
Press enter
Set terminal to qt.
>gnuplot
Press enter
In terminal prompt, type gnuplot and press enter to open gnuplot.


The prompt changes to gnuplot prompt.
To execute a command in terminal, press enter.


I will not mention it separately.
Ctrl + l
I will clear the screen and bring prompt to top of the terminal for clarity.


Press control l on keyboard
>load space 'simple.dem'
To load a script, enter command as seen.


We will run simple dot dem script.
Hover mouse next to Sin(x), atan(x) and cos(atan(x))
This runs the script. A graphical window opens.


Three functions, sin x, atan x and cos atan x are plotted.
The assigned arrow keys allow the user to scroll further in the axis limits.
Hover mouse next to “press enter to continue” and press enter Now, follow prompt and press enter to continue in terminal
Show the change in graphics window Then next script and it's function gets plotted.
Press enter again, as shown in prompt to plot the functions from script.
You may pause the video and scroll over more demonstration files.
I will now close the graphical window
We can also enter the commands sequentially in the terminal to generate plot.


Press control c to come back to gnuplot prompt.
Press q Enter command, q or control c 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 gnuplot dot sourceforge dot net backslash demo
Notice the several demos and scripts for users to learn from.
2D and 3D graphs, histograms and curve fitting are few capabilities software.
Click on Simple functions Click on the Simple functions link
Left side shows graphical plots.


The simple scripts on right side, generate the plots.
Scroll down the page and notice the various styles in plots on the left side.
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 8
Summary


Now let's summarize.


In this tutorial, we


  • Familiarized with gnuplot
  • Familiarized with examples files and demo folder
  • Familiarize with script files and graphics interface


Slide Number 9
Assignment


For assignment activity, please do the following


  • Familiarize with more example files in gnuplot
  • Familiarize with many types of plots, that gnuplot can generate
  • Familiarize with help in user forum as seen in the link


Slide Number 10
Spoken Tutorial Project


This video summarises the Spoken Tutorial Project


If you do not have good bandwidth, you may download and watch it.
Slide Number 11
Spoken Tutorial workshops


The Spoken Tutorial Project Team * conducts workshops using spoken tutorials and
  • gives certificates on passing online tests.


For more details, please write to us.

Slide Number 12
Forum for specific questions:


Post your timed queries in the forum.
Slide Number 13

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