© MatCalc (2008)
 
 
 
 
 
 
 
 
   
 
   

T4: Graphical presentation and export of results (1)

This tutorial was created on

MatCalc version 5.23 rel 1.026

license: free

database: mc_sample_fe.tdb

 

Contents

  • Creating a new graphical window
  • Introduction to the variables window
  • Modifying the appearance of a plot using 'options'
  • Zooming in and displaying x- and y-values
  • Exporting a plot as an image and as numerical data

Before starting...

Open the file saved from Tutorial 3 and select the buffer named 'T=400 to 1600°C'.

1. Plotting a graph

To plot numerical results, it is first necessary to create a graphical window. In the 'View' menu, click on 'Create new window'or click on icon.

 

 

In the 'Create new window' box which appears, there is a list of a number of possible window types. Among these are '(a1)', '(a5)' and '(a6)', which are the familiar 'output', 'phase summary' and 'phase details' windows automatically placed on the screen when a new workspace file is created.

Select type '(p1) Plot: XY-data' and click on 'OK'

 

 

An empty plot with x- and y-axes appears on the screen. Locate the 'Variables' window. (If it is not present, right-click in the toolbar area at the top of the screen and select it from the menu, or click on 'Show variables window' from the 'View' menu.) Expand the 'favorites' section by clicking on the small plus-sign to its left. Then, further expand the section labelled 'F$*' to give the list shown below.

 

 

The syntax 'F$BCC_A2' means 'the phase fraction of BCC_A2', where the dollar sign is a separator between the variable 'F' and the phase to which it applies 'BCC_A2'. In the heading of the list, 'F$*', the asterisk is a wild-card indicating 'all phases'. Select 'F$*', drag it to the empty plot and drop it.

The plot should appear as shown below:

 

2. Changing the appearance of the plot

Results from different buffers

The 'Options' window can now be used to modify the appearance of the plot as required. (Again, if this is not currently shown, it can be made to appear using the View menu or the right-click menu in the toolbar area.)

 

 

Firstly, note that there is a 'buffer' drop-box. By selecting one of the other buffers, the contents of the plot can be changed. The 'default x-data' option (the second line down in the options window) is set to StepValue, i.e. the value of the stepped variable used in the stepped equilibrium calculation. Thus, on selecting the 'C=0 to 1.5 at 500°C' buffer, the x-value changes to carbon content, and the plot looks like this:

 

 

and the plot for the 'C=0 to 1.5 at 800°C' buffer looks like this:

 

Changing the format of the temperature-step plot

Select the 'T=400 to 1600°C' buffer from the buffer drop-box. One of the first things to note is that the x-axis data does not run from 400 to 1600; this is because the step value is expressed by default in Kelvin rather than in Celsius. To change this, double-click on the 'default x-data' line. A box appears, entitled 'New value for 'default x-data''. Enter 'T$C' (temperature in Celsius) in place of 'StepValue'.

 

 

The plot can be changed from colour to black-and-white ('b/w') using the 'style sheet' drop box.

The 'plots' section of the options menu can be expanded using the plus-sign. Below 'plot#0' (the name of the current plot) is a list of options for this plot:

 

Title

This is blank by default. Double-click to enter a title, e.g. 'Phase fraction versus temperature for Fe-0.4 wt.%C'.

Legend

This comprises options for the position of the legend and for the style of the box surrounding it.

 

Axes

The 'axes' section expands to give options for the 'x-axis', 'y-axis', '2nd x-axis' and '2nd y-axis' (the latter two are not used in the current plot).

 

 

Double-clicking on the 'title' line will bring up a box entitled 'New value for title'. Enter 'Temperature [°C]'. In the same way, change the y-axis title to 'Phase fraction'.

The axis type can be set to either linear or logarithmic. A linear scale is more suitable for the temperature axis, but a logarithmic y-axis enables the fractions of minor phases, such as cementite in this example, to be seen more clearly. Change 'lin' to 'log' for the y-axis.

The automatically assigned minimum y-value on the log-scale may not be appropriate, so if this is the case, double-click on 'scaling' and replace 'auto' with '0.01..1'. The two numbers are the lower and upper limits respectively. If one or other of these is missed off, an automatic value is assigned instead. (For example, using '0.01..' is sufficient to give a scale from 0.01 to 1, since 1 is the maximum value of F$*).

Grid

This allows gridlines to be added to the plot, and their appearance to be modified. Change 'disabled' to 'enabled' for 'major-x' and 'major-y' to show major gridlines.

 

Series

Expanding the 'series' section gives a list of options for each data-series. The name of the series (as it appears in the legend) can be changed using 'name'.

The 'locked' option, when set to 'yes', protects the series from any changes when the contents of the buffer are updated. A locked series is indicated by an asterisk by the name, if the automatic name is used.

'Derivative' can be used to display the numerically evaluated first or second derivative of a series.

The 'x-data' and 'y-data' options control which data-sets are displayed on the x- and y-axes. If the 'x-data' is set to 'auto', the default x-data, as specified above, is used.

The appearance of the plots can be modified by setting 'default style' to 'no' rather than 'yes', and then expanding 'line' and 'marker' to give a list of options for colours, styles, sizes etc.

 

 

The image below gives an example of a modified plot.

 

3. Other plot operations

Zooming areas of the plot

Left-click in the plot area and drag the mouse to draw a rectangular box. When the mouse button is released, an enlarged version of the region within the box is shown on the axes. Right-click anywhere in the plot area to return to the original scale.

Displaying x- and y-values

When moving the mouse pointer on the plot area, a black cross appears with the y- and x-values next to it. The coordinates of the centre of the cross are also shown on the status bar at the bottom left of the screen. A larger, red cross can be obtained by pressing the right mouse button.

Exporting data from the plot

Right-clicking in the plot window but outside the area of the plot itself gives a context menu as shown below.

 

 

Click on 'Copy pixmap' to export the plot as a bitmap file. This can be pasted into any graphical application. 'Copy data' exports the numerical data from the plot in the form of tab-separated columns. The data can be imported into a text editor or a spreadsheet application for further processing. 'Export to PDF' allows to create a ".pdf"-file containing the plot.

To finish...

Save the workspace file.

‹‹ to the Top ››  ‹‹ to the Tutorial files ››