Lou Pecora writes:
> I have a question about gnuplot. This may not be the place to ask
> this, but I don't know where else (yes, I googled for a Python forum
> on gnuplot, but didn't see any -- could have missed it)
It seems to me that your problem is not really Python-related even
though you us
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I want to convert the current figure to a numpy array w/o saving the
image to disk. I need this to convert a matlab function to python, the
original code is:
F = getframe(gcf);
X = frame2im(F);
My current workaround is
h = gcf()
h.savefig('tmp.pn
I am trying to generate plots where the y-axis major tick labels are
date/times. My tick labels are getting cut off. How can I set a
larger area on the left to allow room for my entire date time stamps?
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot(x
canvas = gcf().canvas
buf = canvas.tostring_rgb()
img = numpy.fromstring(buf, numpy.uint8)
im_size = canvas.get_width_height()
rgb = img.reshape(im_size[1], im_size[0], 3)
r, g, b = rgb[:,:,0], rgb[:,:,1], rgb[:,:,2]
Or if you're using PIL,
pil_image = PIL.Image.fromstring("RGB", im_size, buf)
http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels
something like "fig.subplots_adjust(left=0.2)" would work.
-JJ
On Tue, Mar 24, 2009 at 11:43 AM, Andy Yates wrote:
> I am trying to generate plots where the y-axis major tick labels are
Wow, right there in the FAQ.
That worked great! Thanks for kindly pointing me in the right direction.
Andy
On Tue, Mar 24, 2009 at 10:56 AM, Jae-Joon Lee wrote:
> http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels
>
> something like "fig.
On Tue, Mar 24, 2009 at 10:46 AM, Jae-Joon Lee wrote:
> canvas = gcf().canvas
> buf = canvas.tostring_rgb()
>
> img = numpy.fromstring(buf, numpy.uint8)
> im_size = canvas.get_width_height()
> rgb = img.reshape(im_size[1], im_size[0], 3)
> r, g, b = rgb[:,:,0], rgb[:,:,1], rgb[:,:,2]
>
Perhaps
John Hunter wrote:
> Perhaps we should make this a friendly helper method of the agg backend
> canvas -- canvas.toarray() returns an rgba numpy array via
> canvas.buffer_rgba?
+1
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R(206) 52
Hi folks,
Is there an OO way to get pyplot.axhline() ?
I found Axes.hlines, but it's not as convienent for doing a quick
horizontal line all the way across the axes: I need to specify the x coords.
thanks,
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/N
Christopher Barker wrote:
> Hi folks,
>
> Is there an OO way to get pyplot.axhline() ?
>
> I found Axes.hlines, but it's not as convienent for doing a quick
> horizontal line all the way across the axes: I need to specify the x coords.
>
> thanks,
>
> -Chris
>
>
Chris,
Maybe it is new, but
Eric Firing wrote:
> Maybe it is new, but svn trunk shows that pyplot.axhline is just calling
> the axes method of the same name.
yes, indeed it is -- arrg! sorry about that -- I really do think I
looked for that!
I am finding it harder to navigate the API docs than I'd like -- I
m not sure wha
On Tue, Mar 24, 2009 at 2:33 PM, Christopher Barker
wrote:
> Eric Firing wrote:
> > Maybe it is new, but svn trunk shows that pyplot.axhline is just calling
> > the axes method of the same name.
>
> yes, indeed it is -- arrg! sorry about that -- I really do think I
> looked for that!
>
> I am find
John and Eric,
Thanks for your responses. I think I can do what I want with your suggestions.
As for the reason I wanted to know this: I found that when I placed a pdf
image created with matplotlib into Adobe Illustrator and then shrunk it down to
fit into my poster that the edges of my plot
Christopher Brown wrote:
> Hi Xavier,
>
> XG> I'm trying to write a pyqt4 application including pylab plotting
> XG> capabilities.
> XG> Up to now, it looks like this (see in attachment).
> XG>
> XG> The picker works fine (I get the msg) *but* I also would like to get
> XG> the (x,y) coordinates an
On Tue, Mar 24, 2009 at 3:01 PM, Xavier Gnata wrote:
>
> > I got some good tips on how to do this from
> > examples/event_handling/pick_event_demo.py
> >
> Thanks!! It works just fine :). IDL is dead. Qt4 python and
> numpy/scipy/numpy are great tools.
Thanks! You may also want to check out th
I hope to see the project on the web. I'm very intersting by simple
examples using mpl with PyQt.
Christophe
>>
>> > I got some good tips on how to do this from
>> > examples/event_handling/pick_event_demo.py
>> >
>> Thanks!! It works just fine :). IDL is dead. Qt4 python and
>> numpy/scipy/nump
I hope to see the project on the web. I'm very intersting by simple
examples using mpl with PyQt.
Christophe
>>
>> > I got some good tips on how to do this from
>> > examples/event_handling/pick_event_demo.py
>> >
>> Thanks!! It works just fine :). IDL is dead. Qt4 python and
>> numpy/sci
I have been trying to install matplotlib under various versions of python.
I was able to get it installed in a 2.4.2 version, but, attempts to install
it in 2.5.3 and 2.6.1 have run into the same problem, that being the inability
of the setup script to locate numpy and freetpye2, both of which a
Hi, everyone,
I am a matplotlib beginner. I am trying to do a chart with 2 y axes using
twinx()
I keep getting error message "malformed header from script. Bad header=
is masked in one or more l: test.cgi" when I do two bar charts on two
axes. if I do one bar chart and one line chart, I wouldnt
http://eli.thegreenplace.net/2009/01/20/matplotlib-with-pyqt-guis/
Once you have seen this example (+the picking), you are able do whatever
you want ;)
You have python, you have the best toolkit I konw (qt4 with qtdesigner)
and you have a very nice way to plot 2D data.
What else ;)
Xavier
> I hop
Using mpl 0.98.5.2 in OO mode with wxAgg backend.
I'm trying to make my legends draggable. It works, but
there is a some inaccuracy with positioning. As I drag it,
the cursor "outruns" the position of the legend, and that
error grows the further away from the initial starting point
the cursor ha
21 matches
Mail list logo