From: James A. <amu...@us...> - 2005-05-30 16:33:13
|
Update of /cvsroot/maxima/maxima/doc/info In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16664 Modified Files: Plotting.texi Log Message: Add documentation for discrete plots. Index: Plotting.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Plotting.texi,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Plotting.texi 21 Apr 2005 04:58:34 -0000 1.15 +++ Plotting.texi 30 May 2005 16:33:04 -0000 1.16 @@ -57,6 +57,7 @@ @c TOO LONG !!! (TICKLES CL-INFO BUG) @defunx plot2d ([@var{expr_1}, ..., @var{expr_n}], @var{x_range}, ..., @var{options}, ...) @deffnx {Function} plot2d (@var{parametric_expr}) @c TOO LONG !!! (TICKLES CL-INFO BUG) @defunx plot2d ([..., @var{expr}, ..., @var{parametric_expr}, ...], @var{x_range}, ..., @var{options}) +@deffnx {Function} plot2d (@var{discrete_expr}) @deffnx {Function} plot2d ([@var{expr_1}, ..., @var{expr_n}], @var{x_range}, @var{y_range}) @deffnx {Function} plot2d ([@var{expr_1}, ..., @var{expr_n}], @var{x_range}) @deffnx {Function} plot2d (@var{expr}, @var{x_range}, @var{y_range}) @@ -144,6 +145,52 @@ @end example @end itemize +Discrete expressions may also be used instead or ordinary or +parametric expressions: +@var{discrete_expr} is a list of the form +@code{[discrete, @var{x_list}, @var{y_list}]} +or +@code{[discrete, @var{xy_list}]}, +where @var{xy_list} is a list of @code{[@var{x},@var{y}]} pairs. + +Examples: +@c PUT DISCRETE EXAMPLES HERE + +@itemize @bullet +@item +Create some lists. +@example +(%i1) xx:makelist(x,x,0,10)$ +(%i2) yy:makelist(exp(-x*1.0),x,0,10)$ +(%i3) xy:makelist([x,x*x],x,0,5)$ +@end example + +@item +Plot with line segments. +@example +(%i4) plot2d([discrete,xx,yy])$ +@end example + +@item +Plot with line segments, using a list of pairs. +@example +(%i5) plot2d([discrete,xy])$ +@end example + +@item +Plot with points. +@example +(%i6) plot2d([discrete,xx,yy],[gnuplot_curve_styles,["with points"]])$ +@end example + +@item +Plot the curve @code{cos(@var{x})} using lines and (@var{xx},@var{yy}) +using points. +@example +plot2d([cos(x),[discrete,xx,yy]],[x,0,10],[gnuplot_curve_styles,["with lines","with points pointsize 3"]])$ +@end example +@end itemize + See also @code{plot_options}, which describes plotting options and has more examples. @end deffn |