SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Alexander D. <Ale...@as...> - 2007年08月30日 16:19:59
Hi,
I have problems with plotting in matplotlib. I want to plot something and
then overlay this plot with a scatter plot, so like this:
clf()
plot( sx, sy, 'kx')
hold(True)
scatter( ix, iy, 40, c=iz, faceted=False)
colorbar()
hold(False)
Although the scatter command is called later, any point drawn with the "
scatter"-command lies behind the black crosses drawn by the "plot" command.
Any ideas how to get the order right?
Cheers
 Alex
From: <jk...@ik...> - 2007年08月30日 18:04:51
"Alexander Dietz" <Ale...@as...> writes:
> Although the scatter command is called later, any point drawn with the "
> scatter"-command lies behind the black crosses drawn by the "plot" command.
> Any ideas how to get the order right?
Set the zorder property. Try e.g.:
clf()
l=plot(rand(50), rand(50), 'kx')
p=scatter(rand(20), rand(20), 40, c=rand(20), faceted=False)
getp(l[0], 'zorder')
getp(p, 'zorder')
setp(p, zorder=3)
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /