SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S



1
(8)
2
(11)
3
(4)
4
(6)
5
(13)
6
(30)
7
(21)
8
(9)
9
(19)
10
(4)
11
(5)
12
(14)
13
(19)
14
(22)
15
(12)
16
(15)
17
(14)
18
(1)
19
(1)
20
(11)
21
(9)
22
(18)
23
(39)
24
(12)
25
(7)
26
(13)
27
(18)
28
(3)
29
(5)
30
(12)
31
(10)

Showing 19 results of 19

From: Eric F. <ef...@ha...> - 2008年10月13日 23:57:04
Zane Selvans wrote:
> 
> On Oct 9, 2008, at 12:55 PM, John Hunter wrote:
> 
>> On Thu, Oct 9, 2008 at 2:40 PM, Zane Selvans <za...@id... 
>> <mailto:za...@id...>> wrote:
>>
>>> I too often feel like I'm just hacking my way
>>> around in Matplotlib, without understanding how it is actually
>>> "supposed" to be used (i.e. how it was designed to work). Is there an
>>> architectural overview floating around somewhere that I'm not aware of?
>>
>> Check out http://matplotlib.sourceforge.net/doc/html/users/artists.html
> 
> That's just what I was looking for.
> 
> However, unfortunately there appears to be some problem with the 
> generation of the figures which are supposed to be embedded within that 
> documentation - they're all appearing as nothing but blank white spaces, 
> both in Firefox 3.0.3 on OS X 10.5.5, and when I download the files and 
> view them with other programs. Do other people see this problem?
Yes, something is broken. I don't know how to fix it, though.
Eric
> 
> Thanks again,
> Zane
> 
> --
> Zane Selvans
> Amateur Earthling
> za...@id... <mailto:za...@id...>
> 303/815-6866
> http://zaneselvans.org
> PGP Key: 55E0815F
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Eric F. <ef...@ha...> - 2008年10月13日 23:52:20
Goyo wrote:
> El dom, 12-10-2008 a las 13:22 -1000, Eric Firing escribió: 
>> Goyo wrote:
>>> Hi all,
>>>
>>> I'm plotting time series and using a custom format for x tick labels
>>> because I want to see both date and time. But calling xlim makes the
>>> default format return -- only dates or only times, it depends on the
>>> displayed interval.
>>>
>>> I can get my preferred format back by calling set_major_formatter again,
>>> but this is inconvenient for interactive use.
>>>
>>> I wonder if there is a better way for changing x limits while keeping
>>> tick labels format unchanged.
>>>
>>> I'm using matplotlib 0.98.3
>>>
>>> Thanks
>>>
>>> Goyo
>>>
>>>
>>> Sample code -- you need a combination of python shell and matplotlib GUI
>>> which allows for interactive use in order to get this working as
>>> expected:
>>>
>>> ----------------------------------------
>>>
>>> from matplotlib import pyplot
>>> from matplotlib import dates
>>> from datetime import datetime, timedelta
>>> from numpy import random
>>>
>>> pyplot.ion()
>>>
>>> # create data
>>> dstart = datetime(2008, 1, 1, 0, 0)
>>> dend = datetime(2008, 1, 5, 23, 50)
>>> delta = timedelta(minutes=10)
>>> x = dates.drange(dstart, dend, delta)
>>> y = random.random_sample(len(x))
>>>
>>> # plot data
>>> pyplot.plot(x, y)
>>>
>>> # format x tick labels
>>> axis = pyplot.gca()
>>> fig = pyplot.gcf()
>>> axis.xaxis.set_major_formatter(dates.DateFormatter('%Y-%b-%d %H:%M'))
>>> fig.autofmt_xdate()
>>>
>>> # draw the figure
>>> pyplot.draw()
>>>
>>> --------------------------------------
>>>
>>> Look at the tick labels, they show both date and time even if you zoom
>>> and pan using the GUI.
>>>
>>> Now if I want to look at the second day:
>>>
>>> dstart = datetime(2008, 1, 1, 0, 0)
>>> dend = datetime(2008, 1, 1, 23, 50)
>>> pyplot.xlim(dstart, dend)
>>>
>>> And the format has changed.
>> I don't see this problem using ipython -pylab with mpl from svn on 
>> linux, gtkagg backend. What version, backend, and platform are you using?
> 
> matplotlib 0.98.3-3ubuntu1~ppa1 from Benjamin Drung's ppa
> (<http://ppa.launchpad.net/bdrung/ubuntu>) on Ubuntu Hardy.
> 
> It was the standard python shell and TKAgg, but I get the same result
> with ipython -pylab and GTKAgg. Indeed the format change can be
> "documented":
> 
> print axis.xaxis.get_major_formatter()
> pyplot.xlim(dstart, dend)
> print axis.xaxis.get_major_formatter()
> 
> The first print:
> <matplotlib.dates.DateFormatter instance at 0xb6e2462c>
> and the second:
> <matplotlib.dates.AutoDateFormatter instance at 0x884dc4c>
> 
> I did some debugging and realized that xaxis.units is None after
> plotting, so xlim triggers a call to xaxis.set_units which sets the
> default formatter (and units, whatever it means).
> 
> If I set my formatter again, xaxis.units is not None anymore but still
> xaxis._update_axisinfo sets the default formatter.
> 
> Anyway I worked around this by writing my own version of xlim which
> first saves the formatter, then sets xlim and sets the saved formatter
> again.
> 
> Goyo
> 
I know some work was done on units support since 0.98.3; given that I am 
not seeing the problem when I try your original example with svn mpl, I 
hope and suspect that this problem has in fact already been solved.
Eric
From: Zane S. <za...@id...> - 2008年10月13日 23:39:05
On Oct 9, 2008, at 12:55 PM, John Hunter wrote:
> On Thu, Oct 9, 2008 at 2:40 PM, Zane Selvans <za...@id...> 
> wrote:
>
>> I too often feel like I'm just hacking my way
>> around in Matplotlib, without understanding how it is actually
>> "supposed" to be used (i.e. how it was designed to work). Is there 
>> an
>> architectural overview floating around somewhere that I'm not aware 
>> of?
>
> Check out http://matplotlib.sourceforge.net/doc/html/users/ 
> artists.html
That's just what I was looking for.
However, unfortunately there appears to be some problem with the 
generation of the figures which are supposed to be embedded within 
that documentation - they're all appearing as nothing but blank white 
spaces, both in Firefox 3.0.3 on OS X 10.5.5, and when I download the 
files and view them with other programs. Do other people see this 
problem?
Thanks again,
Zane
--
Zane Selvans
Amateur Earthling
za...@id...
303/815-6866
http://zaneselvans.org
PGP Key: 55E0815F
From: Goyo <goy...@gm...> - 2008年10月13日 22:56:20
El dom, 12-10-2008 a las 13:22 -1000, Eric Firing escribió: 
> Goyo wrote:
> > Hi all,
> > 
> > I'm plotting time series and using a custom format for x tick labels
> > because I want to see both date and time. But calling xlim makes the
> > default format return -- only dates or only times, it depends on the
> > displayed interval.
> > 
> > I can get my preferred format back by calling set_major_formatter again,
> > but this is inconvenient for interactive use.
> > 
> > I wonder if there is a better way for changing x limits while keeping
> > tick labels format unchanged.
> > 
> > I'm using matplotlib 0.98.3
> > 
> > Thanks
> > 
> > Goyo
> > 
> > 
> > Sample code -- you need a combination of python shell and matplotlib GUI
> > which allows for interactive use in order to get this working as
> > expected:
> > 
> > ----------------------------------------
> > 
> > from matplotlib import pyplot
> > from matplotlib import dates
> > from datetime import datetime, timedelta
> > from numpy import random
> > 
> > pyplot.ion()
> > 
> > # create data
> > dstart = datetime(2008, 1, 1, 0, 0)
> > dend = datetime(2008, 1, 5, 23, 50)
> > delta = timedelta(minutes=10)
> > x = dates.drange(dstart, dend, delta)
> > y = random.random_sample(len(x))
> > 
> > # plot data
> > pyplot.plot(x, y)
> > 
> > # format x tick labels
> > axis = pyplot.gca()
> > fig = pyplot.gcf()
> > axis.xaxis.set_major_formatter(dates.DateFormatter('%Y-%b-%d %H:%M'))
> > fig.autofmt_xdate()
> > 
> > # draw the figure
> > pyplot.draw()
> > 
> > --------------------------------------
> > 
> > Look at the tick labels, they show both date and time even if you zoom
> > and pan using the GUI.
> > 
> > Now if I want to look at the second day:
> > 
> > dstart = datetime(2008, 1, 1, 0, 0)
> > dend = datetime(2008, 1, 1, 23, 50)
> > pyplot.xlim(dstart, dend)
> > 
> > And the format has changed.
> 
> I don't see this problem using ipython -pylab with mpl from svn on 
> linux, gtkagg backend. What version, backend, and platform are you using?
matplotlib 0.98.3-3ubuntu1~ppa1 from Benjamin Drung's ppa
(<http://ppa.launchpad.net/bdrung/ubuntu>) on Ubuntu Hardy.
It was the standard python shell and TKAgg, but I get the same result
with ipython -pylab and GTKAgg. Indeed the format change can be
"documented":
print axis.xaxis.get_major_formatter()
pyplot.xlim(dstart, dend)
print axis.xaxis.get_major_formatter()
The first print:
<matplotlib.dates.DateFormatter instance at 0xb6e2462c>
and the second:
<matplotlib.dates.AutoDateFormatter instance at 0x884dc4c>
I did some debugging and realized that xaxis.units is None after
plotting, so xlim triggers a call to xaxis.set_units which sets the
default formatter (and units, whatever it means).
If I set my formatter again, xaxis.units is not None anymore but still
xaxis._update_axisinfo sets the default formatter.
Anyway I worked around this by writing my own version of xlim which
first saves the formatter, then sets xlim and sets the saved formatter
again.
Goyo
From: Mathew Y. <my...@jp...> - 2008年10月13日 20:59:47
The reason it wasn't working is that my function "foo" didn't have the 
right signature.fmt_xdata takes 1 argument. I have no idea why I didn't 
see an exception displayed.
It's working now that I have
def foo(x) pass
Mathew
John Hunter wrote:
> On Mon, Oct 13, 2008 at 2:27 PM, Mathew Yeates <my...@jp...> wrote:
> 
>> Angus pointed out that I need to do
>> res.fmt_xdata=foo
>> Duh. I was evaluating foo.
>>
>> But this still doesn't work!
>> The default formatting operation is still called.
>> 
>
> This is the correct usage -- so if it is not working you need to post
> a complete example. Perhaps you are not setting the correct Axes
> instance?
>
> JDH
>
> 
From: Eric F. <ef...@ha...> - 2008年10月13日 19:59:58
Michael Lerner wrote:
> Hi,
> 
> I'm trying to plot some data where certain values are marked by a
> sentinel, as per the Cookbook example:
> 
> http://www.scipy.org/Cookbook/Matplotlib/Plotting_Images_with_Special_Values
> 
> However, that code is fairly old, and doesn't work. A version that
> worked as of ~18 months ago was posted to the list:
> 
> http://www.nabble.com/Re:-Trying-p8831162.html
> 
> but it fails when I try to use it with matplotlib 0.98.3 and imshow.
> Does anyone have an updated version?
> 
> Thanks,
> 
> -michael
> 
Michael,
In the mpl "examples" directory there is a script that might be directly 
relevant:
examples/pylab_examples/image_masked.py
Eric
From: Michael L. <mgl...@gm...> - 2008年10月13日 19:53:11
Hi,
I'm trying to plot some data where certain values are marked by a
sentinel, as per the Cookbook example:
http://www.scipy.org/Cookbook/Matplotlib/Plotting_Images_with_Special_Values
However, that code is fairly old, and doesn't work. A version that
worked as of ~18 months ago was posted to the list:
http://www.nabble.com/Re:-Trying-p8831162.html
but it fails when I try to use it with matplotlib 0.98.3 and imshow.
Does anyone have an updated version?
Thanks,
-michael
-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)
http://www.umich.edu/~mlerner
From: John H. <jd...@gm...> - 2008年10月13日 19:32:47
On Mon, Oct 13, 2008 at 2:27 PM, Mathew Yeates <my...@jp...> wrote:
> Angus pointed out that I need to do
> res.fmt_xdata=foo
> Duh. I was evaluating foo.
>
> But this still doesn't work!
> The default formatting operation is still called.
This is the correct usage -- so if it is not working you need to post
a complete example. Perhaps you are not setting the correct Axes
instance?
JDH
From: Mathew Y. <my...@jp...> - 2008年10月13日 19:28:05
Angus pointed out that I need to do
res.fmt_xdata=foo
Duh. I was evaluating foo.
But this still doesn't work!
The default formatting operation is still called.
Mathew
Mathew Yeates wrote:
> Thanks Angus. I tried this out ... it works once and only once!
> BTW, The correct thing to do is
> res=fig.gca()
> res.fmt_xdata=foo() #instead of format_xdata
> res.fmt_ydata=foo()
>
> although, like I said, it only first for the first event. Somehow 
> res.fmt_xdata is getting set back to None
>
>
> Mathew
>
>
> Angus McMorland wrote:
> 
>> Hi Mathew,
>>
>> 2008年10月13日 Mathew Yeates <my...@jp... 
>> <mailto:my...@jp...>>
>>
>> Okay, I've gotten this far. I have a Figure and I think I can
>> change the
>> formatting of the values displayed in the toolbar by setting
>> taking the
>> X axis and setting the function
>> format_xdata
>> to something of my own (something that computes lat/lon). Similar idea
>> for the Y axis.
>>
>> So, given my figure, how do I get the X and Y axis? All I see is
>> gca().
>> But how can I get both? Using fig.get_axes() I only got 1 axis.
>>
>>
>> I think this is a terminology issue: the axis objects returned by 
>> gca() or in the list returned by get_axes() incorporate both the 
>> 'axes' in the sense of x and y axes. With the single result of gca() 
>> you can get at both the x and y axes. For example:
>>
>> import matplotlib.pyplot as plt
>> ax = plt.gca()
>> ax.set_xlims(xmin=-1)
>> ax.set_ylims(ymax=0)
>> ax.format_xdata = ... # if this is how you use this bit - haven't 
>> needed to change these myself
>> ax.format_ydata = ... 
>>
>> I hope that helps,
>>
>> Angus.
>>
>> -- 
>> AJC McMorland
>> Post-doctoral research fellow
>> Neurobiology, University of Pittsburgh
>> 
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> 
From: Angus M. <am...@gm...> - 2008年10月13日 19:21:41
And forwarded to the list... forgot to hit reply to all.
---------- Forwarded message ----------
From: Angus McMorland <am...@gm...>
Date: 2008年10月13日
Subject: Re: [Matplotlib-users] how do I get my axis
To: Mathew Yeates <my...@jp...>
2008年10月13日 Mathew Yeates <my...@jp...>
> Thanks Angus. I tried this out ... it works once and only once!
> BTW, The correct thing to do is
> res=fig.gca()
> res.fmt_xdata=foo() #instead of format_xdata
> res.fmt_ydata=foo()
>
I've just dug around in some old code, now that you've shown me this example
to jog my memory. Perhaps you want to try res.fmt_xdata=foo (i.e. no
brackets, so you pass the function, not the result of the function).
Angus.
> although, like I said, it only first for the first event. Somehow
> res.fmt_xdata is getting set back to None
>
>
> Mathew
>
>
> Angus McMorland wrote:
>
>> Hi Mathew,
>>
>> 2008年10月13日 Mathew Yeates <my...@jp... <mailto:
>> my...@jp...>>
>>
>>
>> Okay, I've gotten this far. I have a Figure and I think I can
>> change the
>> formatting of the values displayed in the toolbar by setting
>> taking the
>> X axis and setting the function
>> format_xdata
>> to something of my own (something that computes lat/lon). Similar idea
>> for the Y axis.
>>
>> So, given my figure, how do I get the X and Y axis? All I see is
>> gca().
>> But how can I get both? Using fig.get_axes() I only got 1 axis.
>>
>>
>> I think this is a terminology issue: the axis objects returned by gca() or
>> in the list returned by get_axes() incorporate both the 'axes' in the sense
>> of x and y axes. With the single result of gca() you can get at both the x
>> and y axes. For example:
>>
>> import matplotlib.pyplot as plt
>> ax = plt.gca()
>> ax.set_xlims(xmin=-1)
>> ax.set_ylims(ymax=0)
>> ax.format_xdata = ... # if this is how you use this bit - haven't needed
>> to change these myself
>> ax.format_ydata = ...
>> I hope that helps,
>>
>> Angus.
>>
>> --
>> AJC McMorland
>> Post-doctoral research fellow
>> Neurobiology, University of Pittsburgh
>>
>
>
>
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
From: Mathew Y. <my...@jp...> - 2008年10月13日 19:16:09
Thanks Angus. I tried this out ... it works once and only once!
BTW, The correct thing to do is
res=fig.gca()
res.fmt_xdata=foo() #instead of format_xdata
res.fmt_ydata=foo()
although, like I said, it only first for the first event. Somehow 
res.fmt_xdata is getting set back to None
Mathew
Angus McMorland wrote:
> Hi Mathew,
>
> 2008年10月13日 Mathew Yeates <my...@jp... 
> <mailto:my...@jp...>>
>
> Okay, I've gotten this far. I have a Figure and I think I can
> change the
> formatting of the values displayed in the toolbar by setting
> taking the
> X axis and setting the function
> format_xdata
> to something of my own (something that computes lat/lon). Similar idea
> for the Y axis.
>
> So, given my figure, how do I get the X and Y axis? All I see is
> gca().
> But how can I get both? Using fig.get_axes() I only got 1 axis.
>
>
> I think this is a terminology issue: the axis objects returned by 
> gca() or in the list returned by get_axes() incorporate both the 
> 'axes' in the sense of x and y axes. With the single result of gca() 
> you can get at both the x and y axes. For example:
>
> import matplotlib.pyplot as plt
> ax = plt.gca()
> ax.set_xlims(xmin=-1)
> ax.set_ylims(ymax=0)
> ax.format_xdata = ... # if this is how you use this bit - haven't 
> needed to change these myself
> ax.format_ydata = ... 
>
> I hope that helps,
>
> Angus.
>
> -- 
> AJC McMorland
> Post-doctoral research fellow
> Neurobiology, University of Pittsburgh
From: Angus M. <am...@gm...> - 2008年10月13日 19:09:08
Hi Mathew,
2008年10月13日 Mathew Yeates <my...@jp...>
> Okay, I've gotten this far. I have a Figure and I think I can change the
> formatting of the values displayed in the toolbar by setting taking the
> X axis and setting the function
> format_xdata
> to something of my own (something that computes lat/lon). Similar idea
> for the Y axis.
>
> So, given my figure, how do I get the X and Y axis? All I see is gca().
> But how can I get both? Using fig.get_axes() I only got 1 axis.
I think this is a terminology issue: the axis objects returned by gca() or
in the list returned by get_axes() incorporate both the 'axes' in the sense
of x and y axes. With the single result of gca() you can get at both the x
and y axes. For example:
import matplotlib.pyplot as plt
ax = plt.gca()
ax.set_xlims(xmin=-1)
ax.set_ylims(ymax=0)
ax.format_xdata = ... # if this is how you use this bit - haven't needed to
change these myself
ax.format_ydata = ...
I hope that helps,
Angus.
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
From: Mathew Y. <my...@jp...> - 2008年10月13日 18:51:44
Okay, I've gotten this far. I have a Figure and I think I can change the 
formatting of the values displayed in the toolbar by setting taking the 
X axis and setting the function
format_xdata
to something of my own (something that computes lat/lon). Similar idea 
for the Y axis.
So, given my figure, how do I get the X and Y axis? All I see is gca(). 
But how can I get both? Using fig.get_axes() I only got 1 axis.
Anybody know?
Mathew
From: Mathew Y. <my...@jp...> - 2008年10月13日 16:23:45
Hi
Is there a way to display the latitude and longitude of the cursor when 
displaying a Basemap?
Mathew
LaTeX can accept embedded Python code with a python.sty file.
This is handy to dynamically generate plots with Matplotlib for a LaTeX slide
presentation.
I successfully embedded lots of matplotlib plot code into my slides
and then had problems with zorder.
For some reason zorder seems to mess up the footer of my Beamer/LaTeX slides.
(For some reason zorder setting make the footer shrink in size.)
Is there any weirdness or side effects about zorder I should be aware of that
would explain this?
Chris
From: Eric F. <ef...@ha...> - 2008年10月13日 05:03:21
Jeff Whitaker wrote:
> Ian Curington wrote:
>> Does anyone have extensions or hints on how to create high quality 
>> vector contour plots on unstructured triangle meshes, with values at 
>> nodes? I can convert to structured with griddata, but I much prefer to 
>> get a direct contour from the original triangles. Thanks! 
> Ian: Matplotlib's contour cannot do this (although I believe the 
> underlying c code does have this capability). I think it would be a 
Although contouring routines often do subdivide the rectilinear grid 
into triangles, and use those triangles to calculate the contours, the 
cntr.c routine in mpl does not. It does everything using only the 
original rectilinear grid.
Eric
> useful addition. For right now, however, your workaround is the best 
> solution. 
> 
> PyNGL (http://www.pyngl.ucar.edu/Graphics/contour_grids.shtml) can 
> contour triangular meshes, if you'd like to give that a try.
> 
> -Jeff
> 
From: Jesper L. <jes...@gm...> - 2008年10月13日 04:48:14
Hi Eric and Goyo
Thanks for your comments and thanks for your working example, Goyo.
Eric Firing <ef...@ha...>:
> If you are only using savefig, not plotting to the screen, then you might as
> well use the agg backend, not the gtkagg.
I have previously used the agg backend without any problems. The
reason I am switching to GTK(Agg) is because I would like to save some
of my plots in jpeg (which only the GTK backend supports). In some
tests that I have made (manually converting png plots to jpeg with
PIL) it seems like this will result in much smaller plots that are
still in good quality. My application serves plots over the internet
so file size is quite important.
Best regards,
Jesper
From: John H. <jd...@gm...> - 2008年10月13日 03:09:02
On Sun, Oct 12, 2008 at 9:01 PM, bwgoudey <bwg...@gm...> wrote:
>
> Hi,
> At the moment, I have a graph which has an un labelled x-axis and all i'm
> drawing is a filled green rectangle every so often. I would like make it so
> that when I zoom in to my graph past a certain threshold, the rectangles
> change so that the first half is a different colour to the second half and
> the x-axis is now labelled. Does anyone have any suggestions on how I could
> implement this? If my explanation hasn't made sense, or lacks details, feel
> free to ask for more.
the clipped line demo at
 http://matplotlib.sourceforge.net/examples/pylab_examples/clippedline.py
shows how to change properties depending on the zoom level. i doesn't
d it *exactly* as you indicate, but you give you enough to go on.
JDH
From: bwgoudey <bwg...@gm...> - 2008年10月13日 02:01:11
Hi, 
 At the moment, I have a graph which has an un labelled x-axis and all i'm
drawing is a filled green rectangle every so often. I would like make it so
that when I zoom in to my graph past a certain threshold, the rectangles
change so that the first half is a different colour to the second half and
the x-axis is now labelled. Does anyone have any suggestions on how I could
implement this? If my explanation hasn't made sense, or lacks details, feel
free to ask for more. 
Cheers
-- 
View this message in context: http://www.nabble.com/Alter-graph-labels-based-on-zoom-level-tp19947898p19947898.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Showing 19 results of 19

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 によって変換されたページ (->オリジナル) /