epssetlinestyle
Customize line styles in MATLAB-generated EPS files
Contents
Syntax
epssetlinestyle(epsfile, 'Param1', Value1, 'Param2', Value2,...) epssetlinestyle(epfile, outfile, 'Param1', Value1, 'Param2', Value2,...)
Description
epssetlinestyle(epsfile) modifies the line style specification of the MATLAB-generated EPS file specified by epsfile as specified by the specified parameter-value pairs.
epssetlinestyle(epsfile, outfile, 'Param1', Value1, 'Param2', Value2,...) saves the modified EPS data to a file specified by the string outfile.
All MATLAB line styles other than solid can be modified using this function. In addition, the grid line style is set independently if the EPS file is generated using epswrite.
For each line styles The elements of the vectors specified for Pattern parameters alternately specify the length of a dash and the length of a gap between dashes, expressed in points. The EPS interpreter uses these elements cyclically; when it reaches the end of the vector, it starts again at the beginning.
The Offset parameters can be thought of as the “phase” of the dash pattern relative to the start of the path. It is interpreted as a distance into the dash pattern (measured in points) at which to start the pattern.
For more details on PostScript line styles, see setdash postscript operator in PostScript Language Reference Manual.
Parameters
The following table lists the available option parameters.
Option |
Value |
Description |
---|---|---|
DotPattern |
positive integer vector {[3]} |
The line pattern for dotted line |
DotOffset |
nonnegative integer {[0]} |
The offset of the dotted line pattern |
DashPattern |
positive integer vector {[6 2]} |
The line pattern for dashed line |
DashOffset |
nonnegative integer {[0]} |
The offset of the dashed line pattern |
DashDotPattern |
positive integer vector {[6 2 2 2]} |
The line pattern for dash-dot line |
DashDotOffset |
nonnegative integer {[0]} |
The offset of the dash-dot line pattern |
GridPattern |
positive integer vector {[3]} |
The line pattern for axes grid lines |
GridOffset |
nonnegative integer {[0]} |
The offset of the axes grid line pattern |
Example
To set line styles to Jiro Doke's default in the EPS file specified by epsfile:
epssetlinestyle(epsfile, 'DotPattern', 3, 'DotOffset', 0, ... 'DashPattern', 6, 'DashOffset', 0, 'DashDotPattern', [6 2 2 2], ... 'DashDotOffset', 0, 'GridPattern', [3 2], 'GridOffset', 0);
See Also
Copyright 2012. Takeshi Ikuma. All rights reserved.