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

 
 

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

Submitter:  Toby Lane <tobeslane>
Submitted:  Thu 14 Jul 2016 09:13:13 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group Member
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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by tobeslane (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-15 mtmiller StatusWorks For Me Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2016-07-14 mtmiller StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code