>>>>> "Humufr" == Humufr <hu...@ya...> writes:
Humufr> Hello, I have a problem to plot some data.
Humufr> I use "plot" to plot some data and "scatter" for other. I
Humufr> obtain a plot whith the point trace with "scatter" are
Humufr> behind the points from "plot". I tried to change the order
Humufr> in the script but that change nothing. Do you know how to
Humufr> do this? (I want use scatter because I want have a
Humufr> specific size for this points)
I just added the long awaited zorder attribute to the Artist base
class in CVS, originally discussed here
http://sourceforge.net/mailarchive/message.php?msg_id=9363527.
There is a new example examples/zorder_demo.py that shows you how to
set the zorder. I'll include it below.
It will be in the next release, probably early next week
#!/usr/bin/env python
"""
The default drawing order for axes is patches, lines, text. This
order is determined by the zorder attribute. The following default
are set
Artist Z-order
Patch / PatchCollection 1
Line2D / LineCollection 2
Text 3
You can change the order for individual artists by setting the zorder.
In the fist subplot below, the lines are drawn above the patch
collection from the scatter, which is the default.
In the subplot below, the order is reversed
"""
from pylab import *
x = rand(20); y = rand(20)
subplot(211)
plot(x, y, 'r', lw=3)
scatter(x,y,s=120)
subplot(212)
plot(x, y, 'r', zorder=1, lw=3)
scatter(x,y,s=120, zorder=2)
show()
|