Home > mpt > @polytope > plot.m

plot

PURPOSE ^

PLOT Plots polytopes in 2D or 3D

SYNOPSIS ^

function [handle,titlehandle]=plot(varargin)

DESCRIPTION ^

PLOT Plots polytopes in 2D or 3D

 handle = plot(varargin)

 ---------------------------------------------------------------------------
 DESCRIPTION
 ---------------------------------------------------------------------------

 PLOT(P,OPTIONS) plots polytope P if 1<=dimension(P)<=3

 Example
   plot(P)             - plots P in default (red) color
   plot(P,'g',Q,'b')   - plots P in green and Q in blue color
   plot(PA,P)          - plots array of polytopes PA and a single polytope P
   plot(PA,Options)    - plots PA using options given in the Options structure


 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 Polytopes
 Options.extreme_solver  - which method to use for extreme points computation
                           (see help extreme)
 Options.newfigure   - if 1, each plot command will open a new figure window
 Options.color='r'   - sets default color
 Options.colormap    - sets a different colormap (default: 'hsv')
 Options.gradcolor   - if 1, third coordinate of a 3D polytope is used to
                       color the polytopes with a gradient coloring (default 0)
 Options.edgecolor   - color of edges (default is black 'k')
 Options.wire=1/0    - plots polytopes in wireframe
 Options.wirestyle   - a string giving style of the wireframe, e.g. '--' or '.-'
 Options.wirecolor   - color of the wireframe (black is default)
 Options.linewidth   - width of the border of polytope (1 is default)
 Options.shade=0-1   - level of transparency (0 - transparent faces, 1 - opaque faces)
 Options.zvalue      - when plotting 2D polytopes and this parameter is given,
                       it will shift all plotted polytopes along the 3rd
                       coordinate by this value
 Options.elevate     - if set to 1, every 1D or 2D polytope is elevated by an
                       increasing value of the z-axis. E.g. plot(P1, P2, P3)
                       will plot P1 with z=1, P2 with z=2 and P3 with z=3.
                       default is 0. this option takes precedence from
                       Options.zvalue.
 Options.xdimension  - whether to plot a section in 2D or 3D (allowed values: 2,3)
                       default value is 3 if this field is not present
 Options.xsection    - through which states to cut the plot (values e.g. [4 5] for a
                       cut along x4 and x5). If you have a 3D polytope and want
                       to intersect it with a plane x3=0, just set
                       Options.xsection=3 and this will do the trick
 Options.xvalues     - at which values to cut (e.g. [0 10] will cut the plot at x4=0, x5=10)
 Options.verbose     - level of verbosity
 Options.marker      - Which marker to use for 1D plots (no by default)
 Options.linestyle   - Style of the border of each polytope (could be etiehr
                       '-', ':', ';' or 'none') (default is '-')
 Options.persp_sect  - If set to 1 and Options.xsection is given (i.e. cut is
                       made, uses perspective plotting (off by default)
 Options.drawnow     - If true (default), the "drawnow" command is used to
                       refresh current figure after all polytopes are drawn

 Note: If Options is missing or some of the fields are not defined, the default
       values from mptOptions will be used

 ---------------------------------------------------------------------------
 OUTPUT                                                                                                    
 ---------------------------------------------------------------------------
 handle      - handle of the figure

 see also POLYTOPE

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003