Hi everyone,
Given a legend [1], I'm trying to figure out which plot objects it
references. Is this possible at all? The reverse would also be fine, i.e.,
given a plot object (e.g., a line), find the legend(s) in which it is
referenced.
Cheers,
Nico
[1] http://matplotlib.org/api/legend_api.html
gests.
--Nico
On Tue, Dec 13, 2011 at 10:19 PM, Vlastimil Brom
wrote:
> 2011/12/13 Nico Schlömer :
>> Hi,
>>
>> upon extracting the face color of a matplotlib.path.Path object,
>>
>> fc = obj.get_facecolor()
>>
>> I always seem to get an array of l
Hi,
upon extracting the face color of a matplotlib.path.Path object,
fc = obj.get_facecolor()
I always seem to get an array of length 4. This initially led me to
believe I'm dealing with CMYK values, but it really seems like the
last entry is *always* 1.0 and the first three give the RGB
repr
Hi all,
when drawing contourf plots, I inspected the underlying
matplotlib.path.Path elements that determine the curves and noticed
that they are all of code LINETO (see
http://matplotlib.sourceforge.net/api/path_api.html#matplotlib.path.Path)
although the number of vertices is 6, actually suggest
Also, set_{x,y,z}lim3d() doesn't seem to influence the plot at all. ?
--Nico
On Mon, Jul 4, 2011 at 6:54 PM, Nico Schlömer wrote:
> Hi all,
>
> this issue has come up before (see
> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg14255.html)
> and n
Hi all,
this issue has come up before (see
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg14255.html)
and now it was me who got bitten by it: As far as I can see, for
mplot3d axes, it is not possible to set the aspect ratio of the axes
to something other than 'auto' -- anywa
Hi all,
given an axes object, is there any way of telling whether
set_axis_off() has been called on this object?
Cheers,
Nico
--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's m
t seems to work better.
Bug?
Cheers,
Nico
On Sat, May 8, 2010 at 10:36 AM, Nico Schlömer wrote:
> Hi,
>
> say, is there a way to query an axis object whether or not the tick
> labels are drawn?
>
> I looked at -- one the x-axis -- get_xticks( and get_xticklabels()
> wh
Hi,
say, is there a way to query an axis object whether or not the tick
labels are drawn?
I looked at -- one the x-axis -- get_xticks( and get_xticklabels()
which in two different situations would spit out a list of doubles
(the tick positions) and a list of text entries of the form
Text(0,0,'').
to a known state, and you can toggle the state.
>
> If there is a substantial need to read the grid state, we could expose
> it via a suitable API at the Axis level. But is this important?
>
> Eric
>
>>
>> &C
>>
>>
>> On May 4, 2010, at 3:27 PM, Ni
This is weird:
When plotting something very simple, e.g.,
t = arange( 0.0, 2.0, 0.01 )
s = sin( 2*pi*t )
plot( t, s, ":" )
I thought I can check weather the grid is on or off by
gca().get_xgridlines()
-- but this *always* returns
with *always* the same lines
Line
Hi all,
is there any way to encircle a text annotation?
Looking at
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate
suggests tinkering with bbox I guess, but I haven't had any success with it.
Hints?
Cheers,
Nico
Hi all,
I'd like to make a countour plot just like in
http://matplotlib.sourceforge.net/examples/pylab_examples/contour_demo.html
but instead of text at the contour lines I'd like to have arrows in
the in the direction of the contour lines. Does anyone know if that's
possible.
Cheers,
Nico
---
Well, I spend some time now setting up a framework for exporting
matplotlib generated figures to TikZ code.
You can find it on
http://github.com/nicki/matplotlib2tikz
The workflow is essentially that you generate your plot (dont show()),
and then call matplotlib2tikz("myfile.tikz"); using a pr
backs and extract cb from it.
>>
>> Aaand everybody: "Fea-ture request, fea-ture request!"
>> get_colorbar() for ScalarMappables :)
>>
>> Cheers,
>> Nico
>>
>>
>>
>>
>> On Mon, Feb 15, 2010 at 7:58 PM, Nico Schlömer
it would be possible to dig up on_changed( ) from the
list of callbacks and extract cb from it.
Aaand everybody: "Fea-ture request, fea-ture request!"
get_colorbar() for ScalarMappables :)
Cheers,
Nico
On Mon, Feb 15, 2010 at 7:58 PM, Nico Schlömer wrote:
>> As far as I can se
> As far as I can see, it is the other way around, i.e., mappables
> (e.g., images) know about the colorbar they are connected.
Well yeah, that'd be even better. I'll check out the API. -- Hints
would still be appreciated of course.
--Nico
ou create?
>
> cbar = colorbar()
> cax = cbar.ax
>
> cax is the axes instance of the colobar you just created.
>
> Regards,
>
> -JJ
>
>
> On Mon, Feb 15, 2010 at 12:04 PM, Nico Schlömer
> wrote:
>> Hi,
>>
>> when plotting a color bar with a plot
Hi,
when plotting a color bar with a plot in matplotlib, the color bar
gets treated internally as Axes.
With two main plots, each of which comes with a color bar, one structurally gets
(that is, a Figure has for childres Axes). To find out which one of
those is a color bar,
> cb.ax.set_yticklabels((r'$-\pi$', '0', r'$\pi$'))
Works like a charm. Thanks!
--Nico
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solar
Hi,
I see that with imsave() it's possible to save an image based on its
cmap. Is there also functionality in matplotlib to to store a file
based on RGB(alpha) information?
Cheers,
Nico
--
SOLARIS 10 is the OS for Data C
Hi,
thanks for the suggestion.
> ax.set_xticks((-pi,pi))
> ax.set_xticklabels(('$-\pi$','$\pi$'))
I guess color bars are a little special in the sense that
AttributeError: Colorbar instance has no attribute 'set_yticklabels'
The tick positions are given not by set_yticks either, but as an op
Hi,
I'm plotting a colorbar with
pylab.colorbar(ticks=(-pi,0,pi))
and trying to add proper "\pi" labels to it. Couldn't find out how to
do that from the manual -- any hints here?
Cheers,
Nico
--
SOLARIS 10 is the O
> I'm not sure, but one reason could be different backends. What kind of backend
> are you using on the 2 machines?
It was indeed a backend issue, fixed now. Thanks!
--Nico
--
Throughout its 18-year history, RSA Conferenc
Hi,
somehow I don't manage to set up matplotlib such that I can draw
animations. I've been using the moving sin example from
http://www.scipy.org/Cookbook/Matplotlib/Animations
which spits out nicely moving sin-waves on one machine, but does
nothing on the other. I'm puzzled. Checked pylab.is
> So what is it you're trying to accomplish? Maybe there is a better way.
Well, I'm recursively iterating through the children of all objects,
starting at gcf() (and then picking up gca(), lines, axes, everything
that belongs to the plot), which is then parsed and a TikZ file is
spit out. I need t
xes and Subplot, but I have no idea how
> this works.
>
> Kind regards,
> Matthias
>
> On Tuesday 12 January 2010 11:40:21 Nico Schlömer wrote:
>> Hm.
>>
>> print type( gca() )
>> print gca().__class__
>> print isinstance( gca(), matplotlib.axes.AxesSubpl
ect has no attribute 'AxesSubplots
?Nico
On Tue, Jan 12, 2010 at 6:45 AM, Joshua J. Kugler wrote:
> On Monday 11 January 2010, Nico Schlömer elucidated thus:
>> quick question from a Python noob:
>> Suppose I have an instance of an object of matplotlib, Is there any
>> wa
Hi,
quick question from a Python noob:
Suppose I have an instance of an object of matplotlib, Is there any
way to check on its type, e.g., whether it is an instance of
matplotlib.axes.AxesSubplots?
Cheers!
Nico
--
This S
29 matches
Mail list logo