octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51938] Contour lines of meshc disappear when


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #51938] Contour lines of meshc disappear when calling axis
Date: Tue, 5 Sep 2017 14:20:01 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #5, bug #51938 (project octave):

The code that sets the level is here in meshc.m:


    zmin = get (hax, "zlim")(1);
    [~, htmp2] = __contour__ (hax, zmin, varargin{:});


The bad is that there is nothing in axis.m that resets the contour.  The good
is that the contour is an hggroup with a parameter for the zlevel.


    kids = get(gca,'children');
    get(kids(1))
    zlevel = -10


Hence we should be able to make things work, for "axis" anyway, but automating
something like the following:


figure
[X,Y] = meshgrid(-3:.125:3);
Z = peaks(X,Y);
meshc(X,Y,Z)
axis('equal')
zlevel = min(get(gca,'zlim'))
kids = get(gca,'children');
set(kids(1), 'zlevel', zlevel)


and that does in fact work.  So, any scripts that modify the axes ranges need
to go through the list of graphics objects, test if they are contour (if they
have the 'zlevel' property, I assume) and change the zlevel property.

That wouldn't be a difficult set of changes to make, but what about the
z-range being changed via the mouse?  I don't see any way of changing z limits
via the plot, only x and y limits.  Except of one considers the "A" autorange
button, then that alters the Z-range.  I've tested Qt plot by printing
something in axis.m when the "axis('equal')" is called--unfortunately, when
the "Autoscale" is pressed in the Qt plot window that doesn't make its way
back to the axis.h routine.  So what to do in that case, I don't know.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51938>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]