[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can we squeeze plot arguments by default?
From: |
Søren Hauberg |
Subject: |
Can we squeeze plot arguments by default? |
Date: |
Thu, 25 Feb 2010 16:33:24 -0800 |
Hi All
It seems like the plotting functions aren't too fond of ND-arrays, which
can be somewhat annoying. Let me give you an example:
## Generate 3D data
T = rand (1, 3, 10);
## Plot first dimension of 3D data
plot (T (1, 1, :))
This gives me the following error:
error: transpose not defined for N-d objects
error: called from:
error: /home/hauberg/Programmer/share/octave/3.3.50
+/m/plot/private/__plt__.m at line 141, column 8
error: /home/hauberg/Programmer/share/octave/3.3.50
+/m/plot/private/__plt__.m at line 83, column 10
error: /home/hauberg/Programmer/share/octave/3.3.50
+/m/plot/plot.m at line 187, column 9
If I 'squeeze' the argument to 'plot', the plot appears just fine.
If I attempt to plot my 3D data
plot3 (T (1, 1, :), T (1, 2, :), T (1, 3, :), '*')
then I get a figure showing just one point. If I, however, 'squeeze' the
inputs to 'plot3', all my data show up.
So, I was just wondering if we could possibly 'squeeze' input arguments
to plotting functions? Matlab does not seem to do this, so it might
introduce incompatibilities.
Soren
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Can we squeeze plot arguments by default?,
Søren Hauberg <=