20 Diagram Graphics


20. DIAGRAM GRAPHICS
20.1 Graphical Objects
The new Drawing Toolbar can be used to draw basic graphical objects (lines, arrows, rectangles, ellipses) in HSC diagrams. These shapes may be used, for example, to illustrate experimental conditions. Versatile formatting options enable the user to edit lines, fill color, line widths and styles.
Drawing Objects can be created and edited with the mouse or the Object Editor, which enables very precise editing using numerical values as inputs. Drawing Objects can also be fixed so that they can be used in all diagrams or saved for later use.
User-specified graphics may be added to diagrams in two ways:
1. Using the Toolbar (Show/Toolbar from the Diagram menu)
2. Using the Object Editor (Show/Object Editor from the Diagram menu)
1. Using the Toolbar
The Toolbar provides a standard drawing interface for drawing simple shapes and for inserting text. The same functions are also available from a popup menu by clicking the right mouse button. In Figure 1 the example file “incropera_92_494.HTR" in the Heat Loss module has been used to compare the convection and radiation coefficients, when the characteristic length (vertical length) varies from 0.2m to 0.8m.

Figure 1: The drawing toolbar, shown here from the HeatLoss module.

The first five buttons are used for drawing lines, arrows, rectangles, ellipses and text. The next eight buttons are used for modifying the objects, for example the line thickness. These options are also available from the Options drop-down box. The x- and y-coordinates for the mouse cursor are shown on the toolbar. In Figure 2 a simple arrow is inserted and moved around using the mouse. All objects can be moved around the diagram using the drag-and-drop technique.


Figure 2: Drawing an arrow and moving it around using drag-and-drop technique.

2. Using the Object Editor
Another method of creating and modifying objects is to use the Object Editor (Show/Object Editor from the menu). The Object Editor consists of three sheets: Lines, Shapes and Labels. The Lines sheet contains all lines and arrows, the Shapes sheet contains all rectangles and ellipses and the Labels sheet contains all the labels.
The cells with a blue foreground color, may be changed manually by typing directly in the cell, for example, the coordinates of a rectangle. The cells with a black foreground color, may be changed by double-clicking on the cell. The appropriate property window for the cell will then appear. For example, by double-clicking on the Color column, the color property window appears. In Figure 3 the color of a rectangle, which demonstrates the approximate transition region in the diagram, is changed using the object editor.

Figure 3: Using the Object Editor to change the object properties.

A created graphical layout may be useful in future diagrams too, therefore HSC 5.0 allows the user to save the layout as an object file (.OBE file), which may be imported to any diagram within HSC 5.0. By selecting File/Save from the object editor menu, all the current objects in the diagram will be saved in a file for later use, see Figure 4.
Notice that the objects in the HSC Object editor use the same coordinate system as the diagram, i.e. the same x- and y-scales. Therefore the location of the objects will be changed on the screen if the x- or y-scale minimum or maximum values are changed. For example, in MS Excel charts the objects use screen coordinates.

Figure 4: Saving the current diagram objects.

20.2 Formatting the Diagram

Most of the diagram formatting options are available within all HSC diagram routines. The following paragraphs give a summary of these options:

1. Calculation points will be drawn on the graph if the menu option Show/Markers is checked. If the menu option Show/Lines is unchecked, the connecting lines between the calculation points will not be drawn. The markers are not drawn by default and the connecting lines are drawn by default.
X- and y-scales may be formatted by double clicking the x- or y-scale numbers or by selecting X-Axis or Y-Axis from the Format menu. For example, the minimum and maximum values may be changed, see Figure 5. In some cases it is also advantageous to change the y-axis to logarithmic scale in order to display the large variations in amounts or concentrations. Notice that the logarithmic y-axis is not available in all modules. From the same window you can also change the number format of x- and y-axis numbers as well as their font size, color, etc.


Figure 5: Changing scales, scale number format and font settings.

3. Gridlines can be edited by selecting Format/Gridlines from the diagram menu and different settings can be specified for the x- and the y-axis. The gridline properties include: color, line width, line style and disabled. Depending on the type of printer in use, different gridline settings may be required in order to produce a desirable printout. An example of a gridline setting is shown in Figure 6, where three different temperature profiles are drawn using the example file “Smelting2.HTR" from the HeatLoss module.


Figure 6: Editing gridlines.

4. The line width of curves, species label font and other graphical properties may be changed by either double clicking on the species labels or by selecting the label with the mouse and choosing Format Label from the menu. This function is not possible by double clicking on the curve. In the label and curve editing window, shown in Figure 7, the thickness of the curve named “Smelting 1200°C" is changed. Notice that alternative line styles to solid are available only for line widths smaller than 0.3 mm.


Figure 7: Changing label and line specifications.

5. The Plot Area can be modified by selecting Format/Plot Area from the menu. The background and border colors can be changed, as well as the border line style and thickness. Changing the border line properties may be necessary in order to view a curve that is on a border line.

Figure 8: Changing plot area specifications.

To edit any label and heading on the screen, simply click the text in the label with the mouse and start to edit.
To create new labels, select Label from the Insert menu. New labels can be deleted using the Label selection in the Delete menu. Default labels cannot be deleted, it is only possible to remove the text from them.
When using HSC Chemistry for the first time it may be necessary to change the default fonts, because the available fonts vary from one computer to another. This is achieved by selecting the Default Font from the Format menu. Usually Times New Roman, bold, size 11 font is the recommended selection. The selection made will automatically be saved in the HSC.INI-file in your Windows directory.
Once satisfied with the diagram, you can print it by pressing Print BW. If a color printer is available press Print Col. The print dialog provides several useful options for a hard copy, see Figure 9.


Figure 9: HSC print dialog for graphics.

To view the diagram in a tabular format or use the data of the diagram in other programs, such as MS Excel, press Table. Press Diagram to return back to the diagram.
To copy the diagram to the Clipboard press Copy, and paste the diagram to other Windows programs. The Copy command uses the Windows Metafile format, which enables you to resize the diagram in other Windows applications in full resolution.
The Save Vec. button saves the diagram using the Windows Metafile format (.WMF).
The Save Ras. button saves the diagram in raster format. There are a number of formats available as well as several editing possibilities. See Chapter 20.3 Editing and Combining Diagrams for a more detailed description.
Press Exit to return the main module.

20.3 Editing and Combining Diagrams

Whereas the previous HSC Chemistry 4 was only able to save diagrams using a WMF format, now more than 30 file formats are available, such as JPG and BMP. HSC diagrams can now be saved in vector (.WMF Windows Meta File) and raster formats. The image dialog may be opened by pressing the Save Ras. button or by selecting File/Save as Raster File from the diagram menu.

Figure 10: Raster image properties dialog.

It is now also possible to combine diagrams (press View Combine Editor) using the new HSC Image Combiner, if the same x- and y-scales have been used. Another new feature is the possibility to edit diagrams (press View Image Editor) using the new HSC Image Editor.

Editing diagrams (HSC Image Editor)
There are a number of functions in the edit mode, for example filtering techniques, rotating, scaling, tilting, copy/paste etc. Once the changes have been made it is easy to save the picture in a number of different formats by selecting File/Save from the menu. Any saved pictures can be used in other programs. Figure 11 shows the editing of a phase stability diagram created with the Lpp module.

Figure 11: Editing the picture using the HSC Image Editor.

Combining diagrams (HSC Combine Editor)
Several diagrams can be combined with the new HSC Image Combiner if the same x- and y-scales have been used. It is also possible to open the Image Combiner from the Image Editor by selecting Combine from the Image Editor menu. Figure 12 shows the combination of two phase stability diagrams created with the Lpp module.


Figure 12: Combining diagrams using the HSC Combine Editor.


Wyszukiwarka