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

 
 

bug #30336: Feature Request: "hold all"

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Sat 03 Jul 2010 01:19:41 PM UTC  
 
Category: NoneSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: David Bateman <dbateman>
Originator Name: Ben AbbottOpen/Closed: Closed
Release: devOperating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project Member

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 Jul 2010 06:30:08 PM UTCdbatemanStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Tue 06 Jul 2010 09:05:25 PM UTCdbatemanSeverity3 - Normal=>1 - Wish
      StatusNone=>Need Info
      Assigned toNone=>dbateman
    Tue 06 Jul 2010 04:56:37 PM UTCrik5Summary"hold all"=>Feature Request: "hold all"

    Back to the top


    Powered by Savane 3.1-cleanup1