1.4 Customizing the output
In addition to vectors or matrices, VRMLplot also accepts a
string of options which you can use to customize the
appearance of the resulting graphs. These options all take
the general form:
'option1=value1; option2=value2; ... optionN=valueN'
For example, the options xlabel, ylabel and zlabel can be
used to change the axis labels:
>> VRMLplot(x,y,z,'xlabel=X axis; ylabel=Y axis; zlabel=Z
axis')
Note that the value of an option may contain spaces.
Remember to use semicolons and not commas to separate
options.
Here's a complete list of options currently supported:
Option
|
Description
|
animation
|
use to set the name of a VRML file defining a model which is to be animated - see section 1.3 for details.
|
append
|
Append allows multiple graphs to be combined together. See the next
subsection for more details.
|
color0
color1
|
Use to manually specify surface colors. By default color1
(corresponding to the highest vertices on the surface) is a light
grey, while color0 (corresponding to the lowest points) is a very dark
grey. Setting colors requires a three element matrix containing red,
green and blue values, each of which is in the range 0 to 1. e.g. to
pseudocolor a plot from blue (lowest) to red (highest) use:
VRMLplot(Z,'color0=[0 0 1]; color1=[1 0 0]')
|
linecolor
meshcolor
modelcolor
spotcolor
|
Use to specify the color of lines, surface meshes, animated models and spots.Setting colors requires a three element matrix containing red,
green and blue values, each of which is in the range 0 to 1. e.g. to produce a plot with blue lines and red spots use:
VRMLplot(Z,'linecolor=[0 0 1]; spotcolor=[1 0 0]')
(Both American and Britsh spellings of color/colour are accepted).
|
mesh
|
Enables or disables mesh lines on surface plots. Set mesh=1 to add grid lines (default is 0).
|
labelsize
|
use to manually set the height of text labels on the graph. In most cases the system should automatically choose a suitable value.
|
linesize
|
use in plots to manually set the size of the lines to use in the graph. At this time only sizes of 0 and 1 are supported. To plot points without connecting lines set linesize=0.
|
shadow
|
Enables or disables shadows. Set shadow=0 to remove shadows (default is 1).
|
spotsize
|
use in plots to manually set the size of the spots used to represent each point in the graph. In most cases the system should automatically choose a suitable value. To generate line graphs without spots, set spotsize=0.
|
text
|
If you are on a slow machine or using an old browser it may
be advantageous to turn off the text labels on the graph
axes. Do this by setting the 'text' option to 0.
|
title
|
use to set a title for the graph. Depending on your browser this may appear somewhere in the window border when your VRML file is displayed.
|
tscale
|
By default the system animates one unit of time in one real second.
Setting the tscale option allows you to stretch or compress time. For
example, tscale=10 causes one unit of time to be animated over 10 real
seconds.
|
xlabel ylabel zlabel tlabel
|
use to set the text under the x,y,z and time axes.
|
xmax ymax zmax tmax
|
use to set the maximum value for each axis. In most cases the system should automatically choose suitable values.
|
xmin ymin zmin tmin
|
use to set the minimum value for each axis. In most cases the system should automatically choose suitable values.
|
xstep ystep zstep tstep
|
use to set the step size along each axis. In most cases the system should automatically choose suitable values.
|
xscale yscale zscale
|
use these to set an absolute scaling factor between units along the
graph axes and global coordinates within the VRML world. By default
the system will either scale each dimension so the resulting graph
fits within a 1 meter cube within the VRML world or, in the case of
animated worlds, it will choose a scaling factor of unity. By
explicitly setting a scale you can override this behavior. For
example, setting xscale=1,yscale=1,zscale=1 will cause a world to be
created where one unit along any axis is represented by 1 meter within
the VRML world. Setting scales of 0.001 will cause each unit to be
represented by 1mm within the VRML. In many cases changes in scale
won't be obvious since the system recomputes viewpoints based on the
scale values you choose.
|