bugGNU Octave - Bugs: bug #31939, Problems using bar() and subplot()

 
 

bug #31939: Problems using bar() and subplot()

Submitter:  None
Submitted:  Mon 20 Dec 2010 09:49:47 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Zinob Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 04 Sep 2011 11:16:52 PM UTC, comment #12: 

No response since Jan 4, 2011.  Closing issue.

Rik <rik5>
Group administrator
Tue 04 Jan 2011 11:36:30 PM UTC, comment #11: 

Ok. I only need the debug file for the case when there is an error.

If "plot(1:10)" gives an error, I'd prefer the debug file for that case.

If there is no error for "png" but there is an error for x11, then ...

    drawnow ("x11", "debug.x11", false, "debug.gp")


Ben Abbott <bpabbott>
Group Member
Tue 04 Jan 2011 09:52:48 PM UTC, comment #10: 

Sorry i skimmed that part about the debug file..
The PDF lib was something I skimped on when installing libs since I am a lazy bastard that never use PDF and lib-cairo can usually generate them (or at least EPS files) for me when I need that.

plot (1:10)
drawnow ("png", "debug.pdf", false, "debug.gp")  ##yes i changed the output format without changing the file name

Since that also works I ran

octave --persist mainanalysis.m
octave:1>  drawnow ("png", "debug.png", false, "debug_of_project.gp")

Of cause, this time i got no error message at all, when runing it from my Win2k3 workstation, i will try from the lappy tomorrow and see if updating did solve it after all, but with some delay... (did i forget to run ldconfig or something after updating gplot?)

(file #22351, file #22352)

Simon Albinsson <zinob>
Tue 04 Jan 2011 09:07:05 PM UTC, comment #9: 

Simon,

Please attach the debug.gp file I asked for.


plot (1:10)
drawnow ("pdf", "debug.pdf", false, "debug.gp")


I can then check to see if there is something wrong with the gnuplot commands produced by Octave, or if there is a problem with your gnuplot.


Ben Abbott <bpabbott>
Group Member
Tue 04 Jan 2011 06:28:29 PM UTC, comment #8: 

I did compile (most) of the needed libraries and was able to install Gnu Plot 4.4.2.

octave:2> _gnuplot_version_
ans = 4.4.2

Unfortunantly the problem persists.

If I use CYGWIN (1.5.3) on my Windows workstation I get proper output (still runing octave on my Slackware 12 server) but a bunch of error messages, se attached Cygwined.png. If I use my Linux X laptop (Ubuntuu 8.14, i don't have it handy and can not check X version ATM) I just get Figure 1 with some graphs missing. Since the Nvidia Card in the server seems to have died I cant not check if it works from the server,

This does not only occur when printing, it occurs when displaying to screen, i must admit i havent even checked if the printed/saved images look like they should.

If you want the project the easiest way of getting it is probably to check it out via SVN: svn -r 11 checkout svn://zxz.se/labb4
(r11 is the most recent version as of writing this)


Simon Albinsson <zinob>
Tue 04 Jan 2011 04:47:24 PM UTC, comment #7: 

Please type "__gnuplot_version__" at Octave's prompt to confirm it finds gnuplot-4.2.6.

Also, please confirm this error only occurs when printing. If so, then please run the commands below ...


plot (1:10)
drawnow ("pdf", "debug.pdf", false, "debug.gp")


... provided the error still occurs, attach the "debug.gp" file.

Ben Abbott <bpabbott>
Group Member
Tue 04 Jan 2011 02:29:19 PM UTC, comment #6: 

I tried updating Gnuplot to 4.2.6 since i do not have the libs for 4.4.x and i havent got the time to upgrade them all at the moment. Alas it still does not work. I do get a new error message how ever:


multiplot> un
             s
              et multiplot;
           ^
           line 0: invalid command


multiplot> set terminal x11 enhanced title "Figure 1"
                        ^
           line 0: You can't change the terminal in multiplot mode


multiplot> se
             t print "/tmp/oct-GYR9yO";
                ^
           line 0: You can't change the terminal in multiplot mode


Simon Albinsson <zinob>
Tue 21 Dec 2010 01:03:58 PM UTC, comment #5: 

This works OK for me.
_gnuplot_version_   4.2.6
octave  3.2.3 and tip
Ubuntu 10.04

Doug

Doug Stewart <dastew>
Tue 21 Dec 2010 12:52:15 PM UTC, comment #4: 

I''ve attached the result I get with the developers sources and with Matlab.

Your result is missing the 1st subplot (correct?).

If you can I recommend you try to update your gnuplot to > 4.2.6. Is that possible?


Ben Abbott <bpabbott>
Group Member
Tue 21 Dec 2010 10:31:16 AM UTC, comment #3: 

_gnuplot_version_= 4.2.0

I have attached both the full .m file and a screenshot of the output. (yeah i know it is not pretty but it was just a quick hack to check the output of a GM tube)

(file #22254,

Simon Albinsson <zinob>
Mon 20 Dec 2010 11:03:06 PM UTC, comment #2: 

Your explanation isn't clear for me, so I've ventured a guess. Let me know if I've inferred incorrectly.

Since your example is incomplete, I've constructed my own.


y = randn (1, 100);
x = 10;
subplot (2, 1, 1)
thishist = hist (y, x);
subplot (2, 1, 2)
thisbar = bar (thishist);


This produces the plot I've attached. The 1st subplot is empty. The 2nd subplot represents a histogram with a gaussian shape.

This works for me using the developer's sources with gnuplot 4.4.0, as well as 4.2.6.

I assume you do not get this result?

You said you were running gnuplot 4.2. Any chance it is earlier than 4.2.6? You can check from Octave by typing "__gnuplot_version__".


Ben Abbott <bpabbott>
Group Member
Mon 20 Dec 2010 10:47:56 PM UTC, comment #1: 

I tried this using tip compiled today.

I could not reproduce the error.

Doug Stewart

Doug Stewart <dastew>
Mon 20 Dec 2010 09:49:47 PM UTC, original submission:  

I am not sure what is needed, for a propper bug report but i get the appended error when using bar and subplot like so


   subplot(2,3,1)
   thishist=hist(backgrounddata, maxfreq-minfreq);
   thisbar=bar(thishist);


It works with hist() with no return so that it plots immediately.

It works just OK with Octave 3.0.0 on my Ubuntu.

Gplot is  4.2 on both machines.

Also the last subplot is not drawn unless i wait a second or two and then type refresh() (at least appending refresh() in the script file does not help) but typing it on the octave command line does.


multiplot> plot "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with ÌÌÌÌ1-lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#000080" , "-" binary format='%float64' record=5 using ($1):($2) title "" with lines linewidth 0.500000  lt 1  lc rgb "#000000" , "-" binary format='%float64' record=2 using ($1):($2) axes x1y1 title "" with lines linestyle 47 ;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^
           line 0: invalid character Ì


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #22352:  debug_of_project.gp added by zinob (30KiB - application/octet-stream - The requested debug files (of cause i got no error message and every thing seems to be working this time))
file #22351:  debug.gp added by zinob (3KiB - application/octet-stream - The requested debug files (of cause i got no error message and every thing seems to be working this time))
file #22350:  Cygwined.png added by zinob (42KiB - image/png - Picture of the output and the terminal messages when "exporting" the image to a windows workstation runing Cygwin.)
file #22256:  matlab.png added by bpabbott (12KiB - image/png)
file #22257:  octave.png added by bpabbott (46KiB - image/png)
file #22254:  broken.m added by zinob (1KiB - application/octet-stream)
file #22255:  broken.png added by zinob (5KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by zinob (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-09-04 rik5 Open/ClosedOpen Closed
    2011-01-04 zinob Attached File- Added debug.gp, #22351
        Attached File- Added debug_of_project.gp, #22352
    2011-01-04 zinob Attached File- Added Cygwined.png, #22350
    2010-12-21 bpabbott Attached File- Added matlab.png, #22256
        Attached File- Added octave.png, #22257
    2010-12-21 zinob Attached File- Added broken.m, #22254
        Attached File- Added broken.png, #22255

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code