Difference between revisions of "Grace/C2/Bar-Chart-and-Error-Bars/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 76: Line 76:
 
|-
 
|-
 
|| Go to '''Data, import, ASCII'''
 
|| Go to '''Data, import, ASCII'''
|| Go to '''Data, import, ASCII''' to open the '''Grace read sets''' dialogue box.
+
|| Go to '''Data, import, ASCII''' to open the '''Grace read sets''' dialog box.
  
 
|-
 
|-
Line 92: Line 92:
 
|-
 
|-
 
|| Click on '''Cancel'''.
 
|| Click on '''Cancel'''.
|| Click on '''Cancel''' to close the dialogue box.
+
|| Click on '''Cancel''' to close the dialog box.
  
 
|-
 
|-
Line 108: Line 108:
 
|-
 
|-
 
|| Drag '''Set Appearance''' window to the side.
 
|| Drag '''Set Appearance''' window to the side.
|| I will the '''Set Appearance''' window for better view.
+
|| I will drag the '''Set Appearance''' window for better view.
  
 
|-
 
|-
Line 117: Line 117:
 
|| Click on '''Apply''', then click on Close.
 
|| Click on '''Apply''', then click on Close.
 
|| Click on '''Apply''' to remove the line in the graph.
 
|| Click on '''Apply''' to remove the line in the graph.
Click on '''Close''', to close the dialogue box.
+
Click on '''Close''', to close the dialog box.
  
 
|-
 
|-
Line 149: Line 149:
 
|| Go to the '''tick marks''' tab.  
 
|| Go to the '''tick marks''' tab.  
 
Choose tick marks on the normal side of graph for x and y axes.
 
Choose tick marks on the normal side of graph for x and y axes.
|| Click on the '''Tick marks''' tab.
+
||From the '''tick marks''' tab, from the '''Draw on''' drop down, choose '''Normal side'''.
From the '''tick marks''' tab, from the '''Draw on''' drop down, choose '''Normal side'''.
+
  
 
Then click Apply to apply the changes.
 
Then click Apply to apply the changes.
Line 157: Line 156:
 
|| In '''Edit''', select x-axis.
 
|| In '''Edit''', select x-axis.
 
In Draw on, select Normal side
 
In Draw on, select Normal side
|| Let us change do the same for x axis.  
+
|| Let us change the same for x axis.  
 
In the '''Edit''' dropdown, select '''X axis'''.
 
In the '''Edit''' dropdown, select '''X axis'''.
 
In the '''Draw on '''dropdown, change draw ticks to '''Normal side'''.
 
In the '''Draw on '''dropdown, change draw ticks to '''Normal side'''.
Line 222: Line 221:
 
|| Next, let’s learn to edit a dataset within the '''Grace''' program.
 
|| Next, let’s learn to edit a dataset within the '''Grace''' program.
  
Click on '''Close''' to close the dialogue box.
+
Click on '''Close''' to close the dialog box.
  
 
|-
 
|-
|| Open the '''set appearance''' dialogue box.
+
|| Open the '''set appearance''' dialog box.
 
|| Double click on the bar in the graph to open the '''Set Appearance''' window.
 
|| Double click on the bar in the graph to open the '''Set Appearance''' window.
  
Line 332: Line 331:
 
|| Click on the '''Edit object'''.
 
|| Click on the '''Edit object'''.
 
Next, Double click on the line.  
 
Next, Double click on the line.  
The '''Edit Line''' dialogue box opens.
+
The '''Edit Line''' dialog box opens.
  
 
|-
 
|-
Line 361: Line 360:
 
|-
 
|-
 
|| Click on '''Close'''.
 
|| Click on '''Close'''.
|| Click on '''Close''' to close the dialogue box.
+
|| Click on '''Close''' to close the dialog box.
  
 
|-
 
|-
Line 433: Line 432:
  
 
|-
 
|-
|| '''Slide Number 8'''
+
|| '''Slide Number 7'''
 
'''Assignment'''
 
'''Assignment'''
 
'''Time-activity chart of your day'''
 
'''Time-activity chart of your day'''

Latest revision as of 16:15, 28 October 2020

Visual Cue Narration
Slide Number 1

Title Slide

Welcome to the spoken tutorial on Bar Chart and Error bars.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Draw a bar chart
  • Label the x-axis with string data
  • Edit the dataset
  • Add error bars in y-axis
  • Change the error bar size and color
  • Add an object and format the style and
  • Delete an object
Slide Number 3

System and Software Requirement

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

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

To follow this tutorial,
  • Learner must be familiar with the Grace interface.
  • For the pre-requisite tutorials, please visit this site.


Slide Number 5

Code Files

The example files required for this tutorial are provided in the code files link.

Please download and extract the files to Desktop.

Go to Desktop. Go to Desktop.
Hover mouse next to bar.txt . Notice the text file bar.txt.
Open bar.txt . Open file bar.txt in a text editor and notice the three data columns.
Hover mouse on the three columns. The first column is the data row number.

Second column is y data.

The third column is the x data which is a string.

Close the text editor. Close the text editor window.
Open Grace. I have opened the Grace program.
Resize graph panel. First, resize the graph panel to fit the field of view.
Go to Data, import, ASCII Go to Data, import, ASCII to open the Grace read sets dialog box.
Select Desktop, select bar.txt. Navigate to Desktop and select the bar.txt file.
Choose Bar for set type. For set type choose bar option from the dropdown.
Click on Ok. Autoscale XY on read and click on Ok to load the data.
Click on Cancel. Click on Cancel to close the dialog box.
Show graph. A bar chart appears along with a line plot.
Cursor on the interface. Let’s format the properties of the bar chart and add the x string data to it.
Open Set Appearance window. Double click on the line to open Set Appearance window.
Drag Set Appearance window to the side. I will drag the Set Appearance window for better view.
In Line properties, Type dropdown, choose None. Under the Line properties, in the Type dropdown, choose None.
Click on Apply, then click on Close. Click on Apply to remove the line in the graph.

Click on Close, to close the dialog box.

Next, go to Plot, select Axis properties. Next, go to the Plot menu and select Axis properties.
Change axis limit from 0 to 4. In the Grace: Axes window, change the x axis limits from zero to four.

Type start at 0 and at stop 4.

Under Tick properties,

Set Major spacing to 1 and Minor tics to zero.

Under Tick properties, I will set Major spacing to one and Minor ticks to zero.
Click on Apply. Click on Apply, to apply the changes.
In Edit, select y axis. In the Edit dropdown, select y axis.
Click on Apply. I will change the y axis limits to start from zero and to stop at 5.

Click on Apply.

Go to the tick marks tab.

Choose tick marks on the normal side of graph for x and y axes.

From the tick marks tab, from the Draw on drop down, choose Normal side.

Then click Apply to apply the changes.

In Edit, select x-axis.

In Draw on, select Normal side

Let us change the same for x axis.

In the Edit dropdown, select X axis. In the Draw on dropdown, change draw ticks to Normal side.

Click on Apply. Again click on Apply to apply the changes to the graph.
Hover mouse next to tick mark Notice how the graph looks after each change has been applied.
Go to the Special tab.

Show, screen shot of Qtgrace.

Click on the Special tab on the right side.

This tab is labeled as custom ticks in Qtgrace.

In special ticks pull down, choose tick marks and labels. In the Special ticks drop down, choose Tick marks and labels.
Open and show the bar.txt file.

Point to first data row and S1.

Let us re-open bar.txt file.

Notice that, the string S1 is associated with the first data point.

Point to first data row and S2.

Point to first data row and S3.

Similarly the string S2 is associated with the second data point.

And the string S3 is associated with the third data point.

Close the file bar.txt.

Point to Edit form in x-axis.

Close the text editor window.

Make sure the Edit form is in x-axis.

Enter data

1 S1

2 S2

3 S3

In the tick location label form, enter data as seen.

Delete the value zero and four on the second column.

Type, S1, S2 and S3 against 1, 2 and 3 in the second column.

Click on Apply. Click on Apply to see the changes in the graph.
Cursor on the interface. Click on Close. Next, let’s learn to edit a dataset within the Grace program.

Click on Close to close the dialog box.

Open the set appearance dialog box. Double click on the bar in the graph to open the Set Appearance window.
Hover mouse next to G(0) and S0 . Under Select set, notice G(0) (S0) [2] [3].

G denotes graph and S refers to the dataset in the graph.

Here it is graph zero and set zero.

Right-click and hold the mouse on G(0) S0 [2] [3]. Right-click and hold the mouse on G(0) S0 to open a context menu.
Show the screen shot in Windows for Qtgrace for the difference. The context menu has more options in Qtgrace.
In the menu choose Edit.

From the sub-menu select In Spreadsheet option.

In the menu choose Edit and from the sub-menu, select In Spreadsheet option.

The dataset opens in the Spreadsheet data set editor.

For Type, select BARDY and click on Apply. In the Type drop-down change BAR to BARDY and click on Apply.
Point to the column in the spreadsheet. An extra column Y1 gets added to the spreadsheet.
Show screenshot of spreadsheet editor in Qtgrace, without the string column. Windows users will not see the string label column in Qtgrace.
Enter 0.4 0.6 0.3 in Y1 column.

Click on Apply.

I will enter the error values as 0.4, 0.6 and 0.3 in the Y1 column and

click on Apply.

Click on, Close the Spreadsheet editor window.

Hover mouse next to error bar.

Click on Close, on the Spreadsheet editor window.

Notice the incorporated error bars on the bar chart.

Go to the Set appearance window.

Choose the Error bar tab.

Next, we will edit the size of the Error bar.

Go to the Set appearance window and choose the Error bar tab.

Set Bar line scroll bar at 50. Change the Bar line to 50 using the scroll bar.
Click on the color drop down and select red color.

Click on Apply.

Click on the color drop down and select red color.

Then, click on Apply.

Point to the changed colour. This changes the color of the error bars to red.
Click on Close. Click on Close in the set appearance window.
Cursor on the window. We will now draw an arrow in the plot.
Click on Window and Drawing Objects. Go to Window in menu and choose Drawing Objects.

The Objects panel opens.

Point to the Objects panel.

Click on Line button in the panel. Point to the plus sign.

Click on the Line button and move the cursor to the plot.

The cursor changes to plus sign.

Click left, move cursor to draw the line.

Drag the cursor to draw the line until the desired location.

I will left click on the desired location to start the line.

Drag the cursor to draw the line until the desired location.

Point to the line.

Left click on the mouse.

Notice that a line is drawn.

Click left again to fix the end location of the line.

Click on Edit object.

Click on the Line props.

Click on the Edit object.

Next, Double click on the line. The Edit Line dialog box opens.

Change line width to 1.5. Change Line width to 1.5 using the triangle buttons.
Under Arrow, In the Place at drop-down, choose End. For the arrow styles, in the Place at drop-down, choose End.
For Type, choose Filled. For the arrow Type, choose Filled.
Set I/L form factor to 0.7 . Decrease I by L form factor to 0.7 .
Hover mouse over Viewport co-ordinates. The Position shows Viewport coordinates.

I will leave it as is.

Click on Accept. Click on Accept to change the arrow style.
Click on Close. Click on Close to close the dialog box.
Click on Copy object in the Objects panel. We can make a copy of an existing object.

To make a similar arrow as this, click on Copy object in the Objects panel.

Shown on screen. The cursor changes to a hand sign.
Left click and hold on the arrow. Left click and hold on the arrow to see a box.
Drag the box and place it in the desired location.

Left click to release the arrow.

Drag the box and place the copied arrow at the desired location.

Left click to release the copied arrow in the desired location.

Click on Delete object in the Objects panel. We can also delete the objects added to the graph.

To delete an added object, click on Delete object in the Objects panel.

Move cursor to the graph. Move cursor to the graph and the cursor changes to a x sign.
Click on the copied arrow. I will click on the newly copied arrow to delete it.
Hover mouse on the popup box. A warning popup window opens, asking the user Kill the line?
Click on Ok. Click on Ok and notice that the object has been deleted.
Hover mouse over text, ellipse. Similarly, we can add text, ellipse and also format their properties.
Click on Close. Click on Close to close the objects panel.
Save with file name barxydy.agr on Desktop. Let us save the Grace project before closing it.

I will save with file as barxydy.agr on Desktop.

Choose File, Exit. Choose File, Exit to exit Grace.
Slide Number 6

Summary

Now let's summarize.

In this tutorial, we,

  • Drew a bar chart
  • Labeled the x-axis with string data
  • Edited the dataset
  • Added error bars in the y-axis
  • Adjusted the error bar size
  • Added an object, formatted the style and deleted an object
Slide Number 7

Assignment Time-activity chart of your day

For assignment, please do the following.
  • Draw a Time-activity graph for your daily activities.
  • For this, time your activities in a day and make a time table.
  • Plot a bar chart with time in hours on y-axis and activities on x-axis.
Glimpse of completed assignment. Your completed assignment may look similar to this.
Slide Number 8

Spoken Tutorial Project

This video summarizes the Spoken Tutorial Project.

Please download and watch it.

Slide Number 9

Spoken Tutorial workshops

The Spoken Tutorial Project team:
  • conducts workshops and
  • gives certificates.

For more details, please write to us.

Slide Number 10

Forum for specific questions:

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

Acknowledgement

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

More information on this mission is available at this link.

This tutorial is contributed by Rani from IIT, Bombay.

Thank you for joining.

Contributors and Content Editors

PoojaMoolya, Ranipv076, Snehalathak