Plot and Edit Bar Charts
In this tutorial, you will learn how to create bar charts by entering values, importing a data file, or specifying a mathematical expression.
When the plot type is set to Bar Charts, the Define Curves panel allows you to add and edit bar charts in the active plot window. It can be accessed one of the following ways.
From the HyperGraph menu, select Bar
Chart to display the Bar Chart ribbon.
From the Bar Chart ribbon, click the Define
tool.
Bar charts are comprised of data and categories. Data can be entered as values, read from an external file, or defined as a mathematical expression.
Create a Bar Chart by Entering Values in the Define Curves Panel
Enter the values 563.35, 567.22, and 423.51.
- From the menu bar select to clear the contents of the current session.
-
Click Add to create a new bar chart named Curve 1.
Curve 1 is highlighted in the series list to indicate it is the active series.
- In the Series field above the bar chart list, rename Curve 1 to Nodal Point 1 and press Enter.
- Under Source, select Values.
-
In the Define Curve dialog, under the column Nodal Point 1, type these three
values:
Index 1: 563.35 Index 2: 567.22 Index 3: 423.51 - Click Apply to create the bar chart.
Create a Bar Chart by Importing Values from the Data File
- Add a second bar chart to the current plot window.
- Rename Curve 2 to Nodal Point 2.
- Under Source, select File.
- Click the file browser and open the nodal_values.dat file, located in the plotting folder.
- Leave Type: set to Unknown.
- Leave Request: set to Block1.
- Leave Component: set to Column1.
- Click Apply to create the bar chart.
Create a Bar Chart Using a Math Expression
-
From menu bar, select bar_chart.mvw,
located in the plotting folder.
and open the session file A second page containing an Line Chart window with three XY data curves is added to the session and is currently displayed.
- Go back to the session’s page 1, which contains the bar chart.
- Add a third bar chart to the current plot window.
- Rename Curve 3 to Nodal Point 3.
- Under Source, select Math.
- In the Expression: field, type the following math expression: {max(p2w1c1.y),max(p2w1c2.y),max(p2w1c3.y)}
-
Click Apply to create the bar chart.
Modify Category Labels
- In the Categories column, click One, rename it x disp. Click Apply to update the bar chart’s label.
- Rename category Two to y disp.
- Rename category Three to z disp.
-
Click Apply to update the bar chart’s labels.