bugGNU Octave - Bugs: bug #64364, scatter does not respect hold

 
 

bug #64364: scatter does not respect hold

Submitter:  Muhali <muhali>
Submitted:  Wed 28 Jun 2023 03:59:40 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 8.1.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 17 Jul 2023 06:31:14 PM UTC, comment #3: 

More testing shows that this is quite difficult to resolve in the C++ code.  The workaround of changing "climmode" to "manual" is best option right now.

Rik <rik5>
Group administrator
Wed 28 Jun 2023 11:31:54 PM UTC, comment #2: 

For what it's worth, Matlab does behave differently from Octave.  The clim property remains set at [0, 0.1] at the same time that the 'climmode' property remains at "auto".


Rik <rik5>
Group administrator
Wed 28 Jun 2023 04:50:44 PM UTC, comment #1: 

I'm not sure what you are trying to say. Both the image as well as the scatter "dot" are displayed in the same axes after I run your example here. So, `hold on` is working afaict.

If you'd like to retain the color limits after the image is displayed, set the "climmode" to manual:

x = 0:10;
y = 0:2:10;
clf; hold on
imagesc(x, y, x'*y/1000) ;
set(gca, 'climmode', 'manual');
get(gca, 'clim')
scatter (6, 8, "r", "filled");
get(gca, 'clim')


For general support questions, the Discourse forum might be the better place to ask: https://octave.discourse.group/

If you still think there is a bug, could you please elaborate a bit which aspect is not working as expected?

Markus Mützel <mmuetzel>
Group administrator
Wed 28 Jun 2023 03:59:40 PM UTC, original submission:  

Doing


x = 0:10;
y = 0:2:10;

clf; hold on
imagesc(x, y, x'*y/1000) ;
get(gca, 'clim')
scatter (6, 8, "r", "filled");
get(gca, 'clim')


gets you two different contour limits of [0 0.1] and [0 1]. This is the reason why the first figure is not 'hold'.

Muhali <muhali>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by muhali (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-28 rik5 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Item GroupNone Matlab Compatibility
    2023-06-28 mmuetzel StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code