help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subplots


From: some_guy
Subject: Re: subplots
Date: Sun, 11 Jul 2010 16:41:48 -0700 (PDT)


Jordi GutiƩrrez Hermoso wrote:
> 
> On 11 July 2010 13:56, some_guy <address@hidden> wrote:
> 
> 
>> Andy, that is a really great feature. Is there someone who writes the
>> documentation on this list?
> 
> Yes. You.
> 
>> If so it would be good to add your example above
>> to the documentation with the explaination that for
> 
> Just submit a patch to this file:
> 
>     
> http://hg.savannah.gnu.org/hgweb/octave/file/tip/scripts/plot/subplot.m
> 
> HTH,
> - Jordi G. H.
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> 
> 

Fair enough.  Ok, so far my idea is to build upon the existing example,
however I don't know how to format a table in latex.  Unless someone else
gets around to it, when I get some more time I'll read up on latex and
submit a patch. So far my changes are in bold below.

## -*- texinfo -*-
## @deftypefn {Function File} {} subplot (@var{rows}, @var{cols},
@var{index})
## @deftypefnx {Function File} {} subplot (@var{rcn})
## Set up a plot grid with @var{cols} by @var{rows} subwindows and plot
## in location given by @var{index}.
##
## If only one argument is supplied, then it must be a three digit value
## specifying the location in digits 1 (rows) and 2 (columns) and the plot
## index in digit 3.
##
## The plot index runs row-wise. First all the columns in a row are filled
## and then the next row is filled. The plot index may be an array or
integer.
## If the plot index is an array then subplot will fill the specified
locations.
##
## For example, a plot with 2 by 3 grid will have plot indices running as
## follows:
## @tex
## \vskip 10pt
## \hfil\vbox{\offinterlineskip\hrule
## \halign{\vrule#&&\qquad\hfil#\hfil\qquad\vrule\cr
## height13pt&1&2&3\cr height12pt&&&\cr\noalign{\hrule}
## height13pt&4&5&6\cr height12pt&&&\cr\noalign{\hrule}}}
## \hfil
## \vskip 10pt
## @end tex
## @ifnottex
## @display
## @example
## @group
##
## +-----+-----+-----+
## | 1 | 2 | 3 |
## +-----+-----+-----+
## | 4 | 5 | 6 |
## +-----+-----+-----+
## @end group
## @end example
## @end display
## @end ifnottex
##
##
## Positioning subplots in the above grid is done in the following way:
## plot a
## subplot(2,3,[1 2 4 5])
## plot(1,1,'o')
##
## plot b
## subplot(2,3,3)
## plot(1,1,'o')
##
## plot c
## subplot(2,3,6)
## plot(1,1,'o')
##
##
## @tex
## here the latex script for the table below is added... TODO
## @end tex
##
## +-----+-----+-----+
## |           |plot b|
## +  plot a   +-----+
## |           |plot c|
## +-----+-----+-----+
##

## @seealso{plot}
## @end deftypefn



-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/subplots-tp1636694p2285597.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]