bugGNU Octave - Bugs: bug #30336, Feature Request: "hold...

 
 

bug #30336: Feature Request: "hold all"

Submitter:  Ben Abbott <bpabbott>
Submitted:  Sat 03 Jul 2010 01:19:41 PM UTC
   
 
Category:  None Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  dbateman
Originator Name:  Ben Abbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 Jul 2010 06:30:08 PM UTC, comment #4: 

Since the axes properties given by Soren had no property that flagged the hold all state I came to pretty much the same opinion as you John. If matlab chooses to not document the mechanism that the hold all state is stored then we have no guarantee that they will keep the same implementation in the future, so we are free to implement this feature how we what.

I used a hidden axes property name "__hold_all__" instead of "__hold_state__" as I consider that more closely describes the function of this property and I pushed a patch for this feature in the changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/84c35a483d1f

D.

David Bateman <dbateman>
Group Member
Wed 07 Jul 2010 03:45:10 PM UTC, comment #3: 

The Matlab docs say that "hold all" arranges for the current line color and style to not be reset for the next plot.  This information does not appear to be stored in the visible axes properties in Matlab.  I have no objection to adding an "internal" property like "__hold_state__" to the list of axes properties if that would make implementing this feature easier.

John W. Eaton <jwe>
Group administrator
Wed 07 Jul 2010 09:39:15 AM UTC, comment #2: 

I get (using version 7.10.0.499 (R2010a)):

>> plot (1:10);
>> hold on
>> get(gca())

        ActivePositionProperty = outerposition
        ALim = [0 1]
        ALimMode = auto
        AmbientLightColor = [1 1 1]
        Box = on
        CameraPosition = [5.5 5.5 17.3205]
        CameraPositionMode = auto
        CameraTarget = [5.5 5.5 0]
        CameraTargetMode = auto
        CameraUpVector = [0 1 0]
        CameraUpVectorMode = auto
        CameraViewAngle = [6.60861]
        CameraViewAngleMode = auto
        CLim = [0 1]
        CLimMode = auto
        Color = [1 1 1]
        CurrentPoint = [ (2 by 3) double array]
        ColorOrder = [ (7 by 3) double array]
        DataAspectRatio = [4.5 4.5 1]
        DataAspectRatioMode = auto
        DrawMode = normal
        FontAngle = normal
        FontName = Helvetica
        FontSize = [10]
        FontUnits = points
        FontWeight = normal
        GridLineStyle = :
        Layer = bottom
        LineStyleOrder = -
        LineWidth = [0.5]
        MinorGridLineStyle = :
        NextPlot = add
        OuterPosition = [0 0 1 1]
        PlotBoxAspectRatio = [1 1 1]
        PlotBoxAspectRatioMode = auto
        Projection = orthographic
        Position = [0.13 0.11 0.775 0.815]
        TickLength = [0.01 0.025]
        TickDir = in
        TickDirMode = auto
        TightInset = [0.0321429 0.0380952 0.0142857 0.0190476]
        Title = [175.001]
        Units = normalized
        View = [0 90]
        XColor = [0 0 0]
        XDir = normal
        XGrid = off
        XLabel = [176.001]
        XAxisLocation = bottom
        XLim = [1 10]
        XLimMode = auto
        XMinorGrid = off
        XMinorTick = off
        XScale = linear
        XTick = [ (1 by 10) double array]
        XTickLabel =
                1
                2
                3
                4
                5
                6
                7
                8
                9
                10
        XTickLabelMode = auto
        XTickMode = auto
        YColor = [0 0 0]
        YDir = normal
        YGrid = off
        YLabel = [177.001]
        YAxisLocation = left
        YLim = [1 10]
        YLimMode = auto
        YMinorGrid = off
        YMinorTick = off
        YScale = linear
        YTick = [ (1 by 10) double array]
        YTickLabel =
                1
                2
                3
                4
                5
                6
                7
                8
                9
                10
        YTickLabelMode = auto
        YTickMode = auto
        ZColor = [0 0 0]
        ZDir = normal
        ZGrid = off
        ZLabel = [178.001]
        ZLim = [-1 1]
        ZLimMode = auto
        ZMinorGrid = off
        ZMinorTick = off
        ZScale = linear
        ZTick = [-1 0 1]
        ZTickLabel =
        ZTickLabelMode = auto
        ZTickMode = auto

        BeingDeleted = off
        ButtonDownFcn =
        Children = [174.002]
        Clipping = on
        CreateFcn =
        DeleteFcn =
        BusyAction = queue
        HandleVisibility = on
        HitTest = on
        Interruptible = on
        Parent = [1]
        Selected = off
        SelectionHighlight = on
        Tag =
        Type = axes
        UIContextMenu = []
        UserData = []
        Visible = on

and

>> close all
>> plot (1:10);
>> hold all
>> get(gca())

        ActivePositionProperty = outerposition
        ALim = [0 1]
        ALimMode = auto
        AmbientLightColor = [1 1 1]
        Box = on
        CameraPosition = [5.5 5.5 17.3205]
        CameraPositionMode = auto
        CameraTarget = [5.5 5.5 0]
        CameraTargetMode = auto
        CameraUpVector = [0 1 0]
        CameraUpVectorMode = auto
        CameraViewAngle = [6.60861]
        CameraViewAngleMode = auto
        CLim = [0 1]
        CLimMode = auto
        Color = [1 1 1]
        CurrentPoint = [ (2 by 3) double array]
        ColorOrder = [ (7 by 3) double array]
        DataAspectRatio = [4.5 4.5 1]
        DataAspectRatioMode = auto
        DrawMode = normal
        FontAngle = normal
        FontName = Helvetica
        FontSize = [10]
        FontUnits = points
        FontWeight = normal
        GridLineStyle = :
        Layer = bottom
        LineStyleOrder = -
        LineWidth = [0.5]
        MinorGridLineStyle = :
        NextPlot = add
        OuterPosition = [0 0 1 1]
        PlotBoxAspectRatio = [1 1 1]
        PlotBoxAspectRatioMode = auto
        Projection = orthographic
        Position = [0.13 0.11 0.775 0.815]
        TickLength = [0.01 0.025]
        TickDir = in
        TickDirMode = auto
        TightInset = [0.0321429 0.0380952 0.0142857 0.0190476]
        Title = [175.002]
        Units = normalized
        View = [0 90]
        XColor = [0 0 0]
        XDir = normal
        XGrid = off
        XLabel = [176.002]
        XAxisLocation = bottom
        XLim = [1 10]
        XLimMode = auto
        XMinorGrid = off
        XMinorTick = off
        XScale = linear
        XTick = [ (1 by 10) double array]
        XTickLabel =
                1
                2
                3
                4
                5
                6
                7
                8
                9
                10
        XTickLabelMode = auto
        XTickMode = auto
        YColor = [0 0 0]
        YDir = normal
        YGrid = off
        YLabel = [177.002]
        YAxisLocation = left
        YLim = [1 10]
        YLimMode = auto
        YMinorGrid = off
        YMinorTick = off
        YScale = linear
        YTick = [ (1 by 10) double array]
        YTickLabel =
                1
                2
                3
                4
                5
                6
                7
                8
                9
                10
        YTickLabelMode = auto
        YTickMode = auto
        ZColor = [0 0 0]
        ZDir = normal
        ZGrid = off
        ZLabel = [178.002]
        ZLim = [-1 1]
        ZLimMode = auto
        ZMinorGrid = off
        ZMinorTick = off
        ZScale = linear
        ZTick = [-1 0 1]
        ZTickLabel =
        ZTickLabelMode = auto
        ZTickMode = auto

        BeingDeleted = off
        ButtonDownFcn =
        Children = [174.002]
        Clipping = on
        CreateFcn =
        DeleteFcn =
        BusyAction = queue
        HandleVisibility = on
        HitTest = on
        Interruptible = on
        Parent = [1]
        Selected = off
        SelectionHighlight = on
        Tag =
        Type = axes
        UIContextMenu = []
        UserData = []
        Visible = on


Søren Hauberg <hauberg>
Tue 06 Jul 2010 09:05:25 PM UTC, comment #1: 

Adding the "all" flag to the hold function is trivial and getting it to "hold" the ColorOrder and LineStyleOrder properties is a three line change in the newplot function.

However, what I don't know is where is Matlab storing the information that an axis or figure has "hold all" set. The NextPlot property doesn't seem to have a radio value that allows this state to be stored, so it must be stored in another property of the axis.

Can someone tell me what matlab gives for

plot (1:10);
hold on
get(gca())

and then for

close all
plot (1:10);
hold all
get(gca())


D.

David Bateman <dbateman>
Group Member
Sat 03 Jul 2010 01:19:41 PM UTC, original submission:  

Matlab supports the command "hold all" which differs from "hold on". The former holds the current plot, as well as its current color and linestyle. Meaning that ...

plot (rand (10, 1))
hold on
plot (rand (10, 1))

... produced two blue lines, but then "on" is replaced by "all" ...

plot (rand (10, 1))
hold all
plot (rand (10, 1))

The linecolor for the second is green (i.e. the second color listed by the axes colororder.

Ben Abbott <bpabbott>
Group Member

 

(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 jwe (Posted a comment)
  • -email is unavailable- added by hauberg (Posted a comment)
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by bpabbott (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-07 dbateman StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2010-07-06 dbateman Severity3 - Normal 1 - Wish
        StatusNone Need Info
        Assigned toNone dbateman
    2010-07-06 rik5 Summary&quot;hold all&quot; Feature Request: "hold all"

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code