Dear matplotlib gurus,
When I use
plot(t,x,'rx',t,y,'bs');
in matlab, it produces blue boxes for y, i.e., squares with a blue
border and a transparent interior, so that if one of them lies on top
of a red x, I can see the red x inside the blue box. The same
construction in matplotlib produces blue squares: squares with a black
border and a blue interior. I can change the color of the interior
with the markerfacecolor or mfc argument, e.g.,
plot(t,x,'rx');
plot(t,y,'bs',mec='b',mfc='w');
but that produces an opaque white interior which renders invisible any
red x it covers up.
I can change the transparency of a line with the alpha argument, but
there seems to be no corresponding markerfacealpha.
Is there a way in matplotlib to get a square marker with a blue border
and a transparent interior?
Thanks,
···
--
Office: 0.17 (Golm) Dr. John T. Whelan
Phone: +49 331 567 7117 MPI for Gravitational Physics
FAX: +49 331 567 7298 (Albert-Einstein Institute)
http://www.aei.mpg.de/~whelan/ D-14424 Potsdam
john.whelan@...1436... john.whelan@...1437...
set markerfacecolor (a.k.a. mfc) = 'None' (make sure you include the quotes).
-Andrew
John T Whelan wrote:
···
Dear matplotlib gurus,
When I use
plot(t,x,'rx',t,y,'bs');
in matlab, it produces blue boxes for y, i.e., squares with a blue
border and a transparent interior, so that if one of them lies on top
of a red x, I can see the red x inside the blue box. The same
construction in matplotlib produces blue squares: squares with a black
border and a blue interior. I can change the color of the interior
with the markerfacecolor or mfc argument, e.g.,
plot(t,x,'rx');
plot(t,y,'bs',mec='b',mfc='w');
but that produces an opaque white interior which renders invisible any
red x it covers up.
I can change the transparency of a line with the alpha argument, but
there seems to be no corresponding markerfacealpha.
Is there a way in matplotlib to get a square marker with a blue border
and a transparent interior?
Thanks,