bugGNU Octave - Bugs: bug #48509, hold on clears graph, rather than...

 
 

bug #48509: hold on clears graph, rather than keeping previous plot

Submitted by:  Toby Lane <tobeslane>
Submitted on:  Thu 14 Jul 2016 09:13:13 AM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: otherOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 15 Jul 2016 07:48:24 AM UTC, comment #5:

Ok. I think you may be misunderstanding how plotting and the hold function work. You may want to ask for clarification on the help mailing list (see http://www.octave.org/support).

You say that you plot cos(x) vs x, the plot shows correctly. Then you close the plot window. Then you run "hold on'. Yes, that is supposed to create a new figure window. When you close the first figure window, whatever you plotted in it has now been lost. If you return to the Octave command prompt without closing the figure window, then you should be able to enter additional commands, including "hold on" and subsequent plot commands, which will affect the existing plot. However, as soon as you call the "close" function or click to close the plot window, the contents are lost.

Also version 3.6.4 is quite old. Are you using that version because you want to use Octave with Visual Studio?

Anyway, I'm closing this bug report since things seem to be working correctly. It's not that the "hold on" function is clearing the plot, it's that you closing the plot is clearing it.

Mike Miller <mtmiller>
Project Administrator
Fri 15 Jul 2016 07:29:32 AM UTC, comment #4:

I am using version 3.6.4, installed from source-forge.net. I cannot recall the exact nature of the installation, I'm afraid.

Here is an example of what I type into octave, and how it reacts:

octave:##> x = [0:pi/50:2*pi];
octave:##> plot (x, cos(x), "r;cosx;"); //graph of cos(x) printed as desired and expected. I then close the pop-up window of the graph to continue
octave:##> hold on; //new pop-up appears with scale 0-1 on both axes, with no plot.

Toby Lane <tobeslane>
Thu 14 Jul 2016 06:34:08 PM UTC, comment #3:

And it is expected behavior that "hold on" without any figure or axes will create a new plot and then implement "hold" on that new axes and figure.

Anonymous
Thu 14 Jul 2016 05:40:59 PM UTC, comment #2:

And even better, can you post a simple complete example that demonstrates the problem you are having? That way we can identify whether this is a bug or a usage problem.

For example if I start Octave and run "hold on" before doing anything else, yes a new figure window opens. But if I plot some points followed by "hold on", subsequent plot commands add to the existing axes rather than clearing them.

Mike Miller <mtmiller>
Project Administrator
Thu 14 Jul 2016 04:33:19 PM UTC, comment #1:

Which version of Octave are you running? And since you are running on Windows, which installation did you use?

Rik <rik5>
Project Administrator
Thu 14 Jul 2016 09:13:13 AM UTC, original submission:

The main problem I'm having is that i cannot seem to plot graphs using multiple lines of instruction. Each time I hit return - even when leaving a ';' at the end of the line - the graph is plotted, meaning that I am having to provide all of the plotting instructions on the same line. Very frustrating!

To try fixing this, I attempted to use the hold command, but when I type: 'hold on', a new window appears with a completely empty plot - quite the opposite of what I'd intended.

I am fairly new to octave, so my apologies if this is a very basic error on my part.

Thanks for you help!

Toby Lane <tobeslane>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by tobeslane (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Jul 2016 07:48:24 AM UTCmtmillerStatusWorks For Me=>Invalid
      Open/ClosedOpen=>Closed
    Thu 14 Jul 2016 05:40:59 PM UTCmtmillerStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1