|
From: | Marco Atzeri |
Subject: | Re: debuging plot |
Date: | Tue, 04 Nov 2014 18:37:32 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 11/4/2014 5:00 PM, CdeMills wrote:
Hello, I made a few improvements to the "dataframe" package recently. For now, plotting one column versus another one work, but vector versus matrix fails. Simple example: t=((0:10).'/10); x=[sin(2*pi*t) cos(2*pi*t)]; plot(t, x) %# OK plot(dataframe(t), dataframe(x)) error: invalid value for array property "ydata" error: called from __line__ at line 119 column 16 line at line 54 column 8 __plt__>__plt2vm__ at line 432 column 15 __plt__>__plt2__ at line 245 column 14 __plt__ at line 113 column 17 plot at line 220 column 10 stopped in /usr/share/octave/3.8.2/m/plot/draw/private/__line__.m error: horizontal dimensions mismatch (11x1 vs 2x1) error: called from: error: /usr/share/octave/3.8.2/m/plot/util/private/__go_draw_axes__.m at line -1, column -1 error: /usr/share/octave/3.8.2/m/plot/util/private/__go_draw_figure__.m at line 161, column 19 error: /usr/share/octave/3.8.2/m/plot/util/__gnuplot_drawnow__.m at line -1, column -1 context: octave-3.8.2 on cygwin; dataframe from the sourceforge repo. I would like to solve this issue before making a new release. How can I debug this issue ?
I guess you need to extract the data to plot from the dataframe plot can handle double but not a dataframe. Trying with octave-dataframe 1.0.0-1 octave:11> dt=dataframe(t) dt = dataframe with 11 rows and 1 columns _1 t Nr double 1 0.00000 2 0.10000 3 0.20000 4 0.30000 5 0.40000 6 0.50000 7 0.60000 8 0.70000 9 0.80000 10 0.90000 11 1.00000 octave:12> dx=dataframe(x) dx = dataframe with 11 rows and 2 columns _1 x1 x2 Nr double double 1 0.00000 1.00000 2 0.58779 0.80902 3 0.95106 0.30902 4 0.95106 -0.30902 5 0.58779 -0.80902 6 0.00000 -1.00000 7 -0.58779 -0.80902 8 -0.95106 -0.30902 9 -0.95106 0.30902 10 -0.58779 0.80902 11 -0.00000 1.00000 octave:13> whos Variables in the current scope: Attr Name Size Bytes Class ==== ==== ==== ===== ===== ans 11x2 314 dataframe dt 11x1 208 dataframe dx 11x2 314 dataframe packages_dir 1x1 115 struct packages_list 1x1 115 struct t 11x1 88 double x 11x2 176 double
Regards Pascal
Regards Marco
[Prev in Thread] | Current Thread | [Next in Thread] |