Plot.DrawSetPenStyle

Prototypes

void DrawSetPenStyle( int nStyle )

Parameters

int nStyle
A predefined constant specifying the new style of the pen. The valid values are OFF, SOLID, DASHED, DOTTED, DASHDOT, and DASHDOTDOT.

Remarks

This method sets the style of the pen. There is only one pen and it is shared by all three drawing regions (PLOTBACKGROUND, PLOTFOREGROUND, GRAPHFOREGROUND). The pen is used to draw lines and grids as well as to draw the outline of figures such as arcs, markers, rectangles, and polygons.

If you set the pen's style to OFF, pen drawing is turned off. Turning pen drawing off can be useful if you want to fill a figure but don't want to draw its outline.

The default pen style is SOLID.

Important Performance Note: There is a serious performance problem in Windows. Under certain conditions, the Windows Graphics Device Interface (GDI) can lock up Windows for a long time while drawing a line. The conditions under which GDI locks up Windows are as follows:

This problem affects the following methods:

DrawArc

DrawLine (when used to draw connected line segments)

DrawPath

DrawPolygon

DrawPolygons (when the bFill parameter is false)

You will not encounter this problem when using the following methods:

DrawAxis

DrawGrid

DrawLine (when used to draw unconnected line segments)

DrawNumericAxis

DrawPolygons (when the bFill parameter is true)

DrawRectangle

Be aware that using the plot's Zoom tool causes IML Studio to generate coordinates internally that extend far outside the plot's window. Thus, although a plot may not have any lines that extend far outside the window when viewed at normal zoom, it will have such lines when viewed using the Zoom tool.

Example
x = { 1 2 3 4 5 6 7 8 };
y = { 2 1 4 5 6 5 6 9 };
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Sample Data", x, y );
plot.DrawSetPenStyle( DOTTED ); 
plot.DrawUseDataCoordinates();
plot.DrawLine( x, y );
See Also

Plot.DrawSetPenAttributes
Plot.DrawSetPenColor
Plot.DrawSetPenWidth