Grace/C2/Creating-a-2D-Graphical-Plot/English

From Script | Spoken-Tutorial
Jump to: navigation, search
Visual Cue Narration
Slide Number 1

Title Slide

Welcome to the spoken tutorial on Creating a 2D graphical plot.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Open a Grace Project
  • Change the line style and width
  • Change symbol properties
  • Change the color of the line
  • Adjust global limits
  • Change axis ticks and draw grid and
  • Add title to the plot
Slide Number 3

System and Software Requirement

To record this tutorial, I am using
  • Ubuntu Linux 16.04 OS
  • Grace version 5.1.25 and
  • Gedit text editor 3.18.3
Slide Number 4

Pre-requisites https:\\spoken-tutorial.org

To follow this tutorial,
  • Learners should be familiar with the Grace interface.
  • For the pre-requisite tutorials, please visit this website.
A Grace project file, required for this tutorial is provided in the code files link.
Show file line.agr on Desktop. Let us go to the Desktop.

I have saved the Grace project file on my Desktop directory as line dot agr.

Cursor on the Ubuntu Desktop. Let us open Grace.
Press windows key. Press the Windows key on keyboard.
Type Grace and press Enter. Type grace in the search form and press Enter to open Grace.
Go to File, open.

Change directory to Desktop.

Go to File, Open to open a Grace project.

In the open project window, change directory to Desktop.

Point to the Selection box.

Select line.agr and click on OK to open the project.

Notice the file line dot agr in the selection box.

Select this file and click on OK to open the project.

Show the error message screenshot. You may get an error message on fonts.

Please close the alert pop-up dialog box.

Point at plot area to show straight line. We can see a graph representing the data.
Hover mouse to limits of x-y axes. X and Y limits on the graph have changed from 0 to 10.
Place cursor on the line, double click to open Grace: Set Appearance.

Click on X button to close.

Place the cursor on the line and double click to open Grace: Set Appearance window.

I will close this dialog box by clicking on the Close button.

Hover mouse over Plot menu, Click on Plot, set appearance This option can be also be opened using the menu bar.

Next, open the set appearance window. Go to Plot menu and select Set Appearance.

Move set appearance window to the side. I will drag the set appearance window for better view.
Hover mouse over Select set box. Since only a single dataset is loaded, it is highlighted in theSelect set text box.
Choose Main tab. Look at the various settings in the Main tab.
Hover mouse over line. By default a solid line plot appears in the graph.
Hover mouse next to line properties section. This style can be changed under the Line properties section.
Select dotted line option from Style drop-down.

Point to the dotted line on the interface.

To change the style of a line, click on the Style drop-down.

Select dotted line option.

Click on Apply. Click on the Apply button.

Notice that solid line has changed to dotted line.


Point cursor on triangles of adjust width of line. Click on up black triangles to increase or decrease the width.
Click on Apply. Click on the Apply button.
Select Color menu. We can change the colour of the line by selecting Color menu.
Choose red. I will choose red color.
Click on Apply. Click on the Apply button.
Point to the line. And observe the changes in the graph.
Hover mouse next to Symbol properties section. Next, let’s add symbols.
Select Symbol properties, Type dropdown. Under Symbol properties option, go to Type and click on the drop down.
Select Circle. Select the desired Symbol shape. I will select Circle.
Hover mouse on Size slider. To adjust the size of the symbol use the Size slider.
Drag the symbol size slider to 40. I will drag the symbol size slider to 40.
Click on the Apply button. Next, click on the Apply button.
Hover cursor next to line and symbol. Data points are represented as circles on the line.
Click on Symbols tab. Now click on Symbols tab to change symbol properties.
Click on Pattern drop-down, select Solid pattern picture to get filled symbol. Under Symbol fill, click on the Pattern drop-down.

Select the Solid pattern picture to get filled symbol.

Click on Apply. Click on the Apply button.
Point mouse at symbol skip option.

Click on the up or down arrow triangle.

If the data points are closely spaced, we can skip specified symbols for clarity.

Click on the arrow triangle of Symbol skip as required.

Click on Apply and click Close in the Grace: Set Appearance. Click on Close to exit the Grace: Set Appearance window.
Cursor on the plot. Now we will fine adjust global limits.
Adjust global limits under, Plot, Axis properties tab. Go to Plot and select Axis properties to open Grace: Axes dialog box.
In Edit drop-down choose, X axis. In the Edit drop-down, choose X axis.
Select start and stop of the x-axis limits to be displayed as -1 to 10. Select start and stop of the x-axis limits to be displayed as -1 to 10.
Click on Apply.

Place cursor on the Limits of x axis.

Click on the Apply button and observe the changes in the limits of the x axis.
Go to Axis label, label string and type x-axis . Next, let's add axis labels.

Under Axis Label, go to Label string text box, and type x-axis.

Click on Apply. Click on the Apply button to see the changes.
Type 4 for Major spacing and 2 for minor spacing of axis tick marks Under Tick properties, type 4 for Major spacing.

And type 2 for Minor ticks.

Click on the Apply button. Click on the Apply button.
Point to the graph. Notice the changes in the graph.


Under Edit drop-down, select Y axis. To format y-axis properties, select Y axis in Edit drop-down.
Type Start as -1, and End as 11.

Hover mouse next to y-axis.

Choose to Start at -1 and End at 11.

And click on the Apply button.

Axis limits of y-axis in the graph change accordingly.

In Label string type y-axis and click on Apply. In Label string textbox, type y-axis and click on Apply to add y-axis label.
Type 4 for Major spacing and 2 for minor spacing of axis tick marks. Next we will change Major spacing and Minor ticks.

Type 4 for Major spacing and 2 for Minor spacing of axis tick marks.

Click on Apply. Click on Apply.
Go to Under tick marks tab.

Point to the Pointing and Draw on drop downs.

Now we will go to Tick marks tab.

Under Tick marks tab, we can see Pointing and Draw on drop downs.

In Draw on drop down, choose Normal side. In the Draw on drop down choose tick marks on Normal side.
Click on Apply. Click on Apply.
Select Y axis, choose Normal side in Daw on dropdown , Click on Apply. I will do this for both x and y axes.
Highlight graph. These help to extend tick marks on both sides of the graph or on one side.
Hover mouse next to Grace: Axes, tick marks tab, Draw grid lines. Let's select Draw grid lines for x-axis.
Click on Draw grid lines check-box for Major ticks and for Minor ticks.

Click on Apply.

Click on Draw grid lines check-box for Major ticks and for Minor ticks.

Click on Apply.

Choose y axis in the ‘’’Edit’’’ dropdown.

Check the box for Major ticks and Minor ticks.

Select y axis in Edit Drop down.

Check box for major ticks and for minor ticks, for y axis.

Click on Apply. Click on Apply.

This shows grids like a graph paper.

Un-check grid box of Grace: Axes tick marks > Draw grid lines in Major ticks and Minor ticks. Click on Apply. I will uncheck the box for Major and minor ticks grid.

Click on Apply to remove the grid.

Choose x axis in Edit dropdown.

Uncheck both Major and minor ticks grid box and click on Apply.

I will do this for both x and y axes.

In the Edit drop-down choose, X axis.

Uncheck the box for Major ticks and minor ticks.

Click on Apply.

Uncheck the box for Major ticks and minor ticks.

Click on Apply to remove the grid.

Hover mouse over Axis Label & bar. Please try the following.

Under Axis Label & bar tab, change the font style and color of the font.

Click on Close. Click on Close, to exit the Grace:Axes window and observe the changes.
Go to Plot and select Graph Appearance.

Point to the window.

Let's add a title to the graph.

Go to Plot and select Graph Appearance. The Graph: Appearance window opens.

In Main tab, under Titles, type Linear Graph. In the Main tab, go to the Titles form.

Type the title of the graph as,Linear Graph.

Click on Apply.

Point to the title.

Click on Apply.
Under Titles tab, click on Various fonts and sizes available. Under Titles tab, notice the option to change the font type.
Point mouse to Character size change slider. Character size can be changed using the slider.
Point to the various colors available in the color option. Various colors are available in the color option.
Cursor on the dialog box. I will use the default values here.
Click Close to exit. Click on Close to exit.

Observe the changes in the plotted graph.

Click on File, Save as. Let us save the file with a different name.

Click on File, Save as to save the changes in the project.

Change directroy to Desktop. Change to Desktop directroy.
Give file name 2dplot.agr.

Click on OK.

In the selection textbox change the file name.

I will type, 2dplot dot agr and click on OK to save the project.

Click on File, Exit Select File, Exit in menu, to close Grace.
Slide Number 5

Summary

Now let's summarize. In this tutorial, we,
  • Opened a Grace Project
  • Changed graph properties like line style, width and color
  • Changed properties of symbols
  • Adjusted global limits
  • Adjusted axis tick marks and grid and
  • Added title to the plot
Slide Number 6

Assignment

As an assignment,
  • Generate XY data set to draw a parabola.
  • Use integer values between -8 to +8 and plot a graph in Grace.
  • Change color, add title and symbol.
Show the assignment The completed assignment should look similar to this.
Slide Number 7

Spoken Tutorial Project

This video at the following link summarises the Spoken Tutorial Project.

Please download and watch it.

Slide Number 8

Spoken Tutorial workshops

The Spoken Tutorial Project team:
  • conducts workshops and gives certificates.
  • For more details please write to us.
Slide Number 9

Forum for specific questions:

Please post your timed queries in this forum.
Slide Number 10

Acknowledgement

Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.

More information on this mission is available at this link.

This is Rani from IIT Bombay

Thank you for joining.

Contributors and Content Editors

Madhurig, PoojaMoolya, Ranipv076, Snehalathak