Discussion:
[Matplotlib-users] bug in zorder example
plotter
2015-04-06 15:23:15 UTC
Permalink
The second example on
http://matplotlib.org/examples/pylab_examples/zorder_demo.html seems to
expose a bug, which is clearly visible in the vector version:

The blue curve with zorder=2 is plotted below the frame and all others with
zorder >= 3 are plotted above the frame. This is because the frame zorder is
hardcoded to be 2.5. This behaviour is certainly unexpected by most users.
How can one modify the mutual zorder of lines without conflicting with
standard axis elements?



--
View this message in context: http://matplotlib.1069221.n5.nabble.com/bug-in-zorder-example-tp45342.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Benjamin Root
2015-05-07 15:25:21 UTC
Permalink
you can always change the zorder of the frame using set_zorder(). Are you
talking about the frame of the legend or the plotting area?
Post by plotter
The second example on
http://matplotlib.org/examples/pylab_examples/zorder_demo.html seems to
The blue curve with zorder=2 is plotted below the frame and all others with
zorder >= 3 are plotted above the frame. This is because the frame zorder is
hardcoded to be 2.5. This behaviour is certainly unexpected by most users.
How can one modify the mutual zorder of lines without conflicting with
standard axis elements?
--
http://matplotlib.1069221.n5.nabble.com/bug-in-zorder-example-tp45342.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Thomas Caswell
2015-05-07 15:30:46 UTC
Permalink
zorder can be negative, if you want to ensure that all of your lines are
always below all of the standard axis components simple decrease the
zorder of the elements you want behind rather than increasing the zorder of
the elements you want in front.

@ben look at the top left of
Loading Image...
and compare where it looks like the red and green lines are clipped.

Tom
Post by plotter
The second example on
http://matplotlib.org/examples/pylab_examples/zorder_demo.html seems to
The blue curve with zorder=2 is plotted below the frame and all others with
zorder >= 3 are plotted above the frame. This is because the frame zorder is
hardcoded to be 2.5. This behaviour is certainly unexpected by most users.
How can one modify the mutual zorder of lines without conflicting with
standard axis elements?
--
http://matplotlib.1069221.n5.nabble.com/bug-in-zorder-example-tp45342.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Benjamin Root
2015-05-07 15:38:37 UTC
Permalink
But, why is it doing that only along the top edge and not the other edges
(or are my eyes that bad)?
Post by Thomas Caswell
zorder can be negative, if you want to ensure that all of your lines are
always below all of the standard axis components simple decrease the
zorder of the elements you want behind rather than increasing the zorder of
the elements you want in front.
@ben look at the top left of
http://matplotlib.org/mpl_examples/pylab_examples/zorder_demo_01.hires.png
and compare where it looks like the red and green lines are clipped.
Tom
Post by plotter
The second example on
http://matplotlib.org/examples/pylab_examples/zorder_demo.html seems to
The blue curve with zorder=2 is plotted below the frame and all others with
zorder >= 3 are plotted above the frame. This is because the frame zorder is
hardcoded to be 2.5. This behaviour is certainly unexpected by most users.
How can one modify the mutual zorder of lines without conflicting with
standard axis elements?
--
http://matplotlib.1069221.n5.nabble.com/bug-in-zorder-example-tp45342.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Thomas Caswell
2015-05-07 15:45:41 UTC
Permalink
It is doing it every where. Also look at the tick above the 2 on the
bottom it is slightly clipped.

It is definitely seems worse on the top, which might be showing a
fence-post issue in the clipping/Agg rendering.

As the OP points out zooming in on
http://matplotlib.org/mpl_examples/pylab_examples/zorder_demo_01.pdf makes
it really obvious that this is the case everywhere.

That said, I don't think that this is a 'bug' persay. We have to pick
_some_ zorder for the frame and 2.5 is is good as any other. We do have a
documentation problem as I don't know where that information is other than
in the source.

Tom
Post by Benjamin Root
But, why is it doing that only along the top edge and not the other edges
(or are my eyes that bad)?
Post by Thomas Caswell
zorder can be negative, if you want to ensure that all of your lines are
always below all of the standard axis components simple decrease the
zorder of the elements you want behind rather than increasing the zorder of
the elements you want in front.
@ben look at the top left of
http://matplotlib.org/mpl_examples/pylab_examples/zorder_demo_01.hires.png
and compare where it looks like the red and green lines are clipped.
Tom
Post by plotter
The second example on
http://matplotlib.org/examples/pylab_examples/zorder_demo.html seems to
The blue curve with zorder=2 is plotted below the frame and all others with
zorder >= 3 are plotted above the frame. This is because the frame zorder is
hardcoded to be 2.5. This behaviour is certainly unexpected by most users.
How can one modify the mutual zorder of lines without conflicting with
standard axis elements?
--
http://matplotlib.1069221.n5.nabble.com/bug-in-zorder-example-tp45342.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...