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

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 221: Line 221:
 
First open a web browser.
 
First open a web browser.
 
|-
 
|-
||  
+
|| Open web browser.
 
|| I will show how to access the examples files online in the next step.
 
|| I will show how to access the examples files online in the next step.
  
 
|-
 
|-
|| Open web browser.
+
|| Go to, '''gnuplot.sourceforge.net/demo'''
Go to, '''gnuplot.sourceforge.net/demo'''
+
 
|| I will open firefox web browser.  
 
|| I will open firefox web browser.  
 
Go to, web address as seen in the video
 
Go to, web address as seen in the video
Line 284: Line 283:
 
* Familiarize with the help in user forum as seen in the link
 
* Familiarize with the help in user forum as seen in the link
  
[http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html]
+
http://gnuplot.10905.n7.nabble.com/Gnuplot-User-f3.html
 +
 
 
|-
 
|-
 
|| '''Slide Number 8'''
 
|| '''Slide Number 8'''
  
 
'''Assignment'''
 
'''Assignment'''
 
 
  
 
|| This is what this help page looks like.
 
|| This is what this help page looks like.

Revision as of 15:49, 19 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.

Open web browser. I will show how to access the examples files online in the next step.
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