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
(38) |
2
(31) |
3
(9) |
|
4
(13) |
5
(24) |
6
(11) |
7
(8) |
8
(14) |
9
(7) |
10
(4) |
|
11
(7) |
12
(11) |
13
(16) |
14
(19) |
15
(11) |
16
(9) |
17
(3) |
|
18
(4) |
19
(47) |
20
(28) |
21
(9) |
22
(9) |
23
(11) |
24
|
|
25
|
26
(12) |
27
(22) |
28
(20) |
29
(16) |
30
(19) |
|
|
From: Gökhan S. <gok...@gm...> - 2010-04-21 06:10:13
|
On Tue, Apr 20, 2010 at 11:11 AM, Gökhan Sever <gok...@gm...>wrote: > > > On Tue, Apr 20, 2010 at 2:42 AM, Matthias Michler <Mat...@gm... > > wrote: > >> Hi Gökhan, >> >> thanks for testing this small patch. Maybe one of the developers could >> submit >> it or should I place it on the patch-tracker? >> >> > Usually after some pinging someone picks up the code and commits in to the > svn. > > >> About the toggling of all grid-lines using >> event.inaxes.grid(which='majorminor') >> I not sure this is intended, because this means that you will allways >> toggling >> major and minor tick - grid lines using key 'g' instead of only toggling >> major tick grid lines. Maybe a developer or other users could comment on >> the >> preferred behavior. >> > > Just create a simple plot and log-log x,y-axes and try hitting "g". Both > minor and major gridlines must be visible to get a clear view. In some cases > grids clutter the figure instead of helping. > > In my previous post, the main point was change in > event.inaxes.grid(which='majorminor') doesn't really work as expected. Could > you at least check that behavior? > > > >> >> Kind regards, >> Matthias >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > -- > Gökhan > Hi Matthias, I spotted another annoyance: Save the following lines in a file called test.py and run python test.py import matplotlib.pyplot as plt plt.plot(range(100)) plt.xscale('log') plt.yscale('log') ax = plt.gca() ax.grid(False, which='majorminor') plt.show() This doesn't work properly in the first call. If you call it from within Ipython -pylab using run test.py again no difference. Only when you call ax.grid(False, which='majorminor') grids disappear. -- Gökhan |
|
From: Michiel de H. <mjl...@ya...> - 2010-04-21 02:22:13
|
Well, the example with the comment "WARNING : illustrating how NOT to use show":
for i in range(10):
# make figure i
show()
works perfectly fine with the Mac OS X backend, and I doubt that there is some fundamental reason why this can work with the Mac OS X backend but not with other backends.
--Michiel
--- On Tue, 4/20/10, Alan G Isaac <ala...@gm...> wrote:
> From: Alan G Isaac <ala...@gm...>
> Subject: Re: [Matplotlib-users] show() at the end of each function of an ensemble of scripts
> To: mat...@li...
> Date: Tuesday, April 20, 2010, 9:51 PM
> http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show
>
> hth,
> Alan Isaac
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Alan G I. <ala...@gm...> - 2010-04-21 01:51:49
|
http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show hth, Alan Isaac |
|
From: Stephen G. <ste...@op...> - 2010-04-21 01:42:01
|
Hi,
Sorry haven't used ipython, so not sure if there is another/better
ipython way.
Attached is how I solved it in normal python.
I added a "next line" button to the graph, and set the ydata for the
line each time the button is pushed.
There is a couple of set_ylim lines commented out, depending on the
nature of your data, it might be appropriate to uncomment one of those,
however the set_aspect line may might mean the graph is very tall and
skinny with the supplied data.
Hope that gives you some ideas for your own code.
Steve
On 21/04/2010 3:35 AM, tom...@gm... wrote:
> Hello everyone,
>
> if I read a column file like this (simplified to integers):
>
> 0 1 2 3
> 1 2 3 4
> 2 3 4 5
> 3 4 5 6
>
> with: "data = np.loadtxt("fileName")", why can't I use a for loop
> inside ipython (started with "-pylab" option) to plot each of the
> Line2D objects and then draw them on the plot? I am using matplotlib
> to debug a computational geometry code and I would like these lines to
> plot paused by the user input so that I can identify when (where)
> exactly the wrong calculations happen:
>
>
> import numpy as np
>
> import matplotlib.pyplot as plt
>
> fig1 = plt.figure()
>
> ax1 = fig1.add_subplot(111)
>
> ax1.set_aspect("equal")
>
> for line in data:
>
> raw_input("press enter to plot the line")
>
> ax1.plot([line[0],line[2]],[line[1],line[3]],'b')
>
> plt.draw()
>
>
>
> This way I could see with pressing e.g. the return key when my
> calculations go wrong.... any advice?
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Michiel de H. <mjl...@ya...> - 2010-04-21 01:19:59
|
--- On Tue, 4/20/10, Ryan May <rm...@gm...> wrote:
> Antony Lee <ant...@en...> wrote:
> > That would be a solution, indeed. However, is there
> > really no way of coming back to a pre-plt.show() state
> > once all windows are closed? What kind of
> > irreversible things does plt.show() do?
>
> It starts the GUI toolkit event loop, which starts to make
> things messy if you try to call show() again. It often works,
> but calling show() more than once is most-definitely not
> supported.
>
But what exactly does show() do that prevents it from being called again? At least for the Mac OS X and the gtkcairo backends, calling show() multiple times doesn't seem to cause any problems. Can you give an example where calling show() multiple times breaks things? If there is such a case, it may reveal a lurking bug in show() itself.
--Michiel.
|
|
From: Christopher B. <Chr...@no...> - 2010-04-20 23:21:18
|
Antony Lee wrote: > Well, the problem isn't there (I believe). The workflow I'd like to > implement is that, for example the user does some data processing (in > ipython), plots some data (I need a show() here), closes the plot > window, does some other data processing (in ipython), I'm bit confused -- does ipython pylab mode not work for this? That's what it's for. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Antony L. <ant...@en...> - 2010-04-20 22:36:18
|
2010/4/20 Ryan May <rm...@gm...> > On Tue, Apr 20, 2010 at 4:44 PM, Antony Lee <ant...@en...> wrote: > > That would be a solution, indeed. However, is there really no way of > coming > > back to a pre-plt.show() state once all windows are closed? What kind of > > irreversible things does plt.show() do? > > It starts the GUI toolkit event loop, which starts to make things > messy if you try to call show() again. It often works, but calling > show() more than once is most-definitely not supported. > OK, I can understand this... > > Now, depending on what exactly you're trying to do, you can set > everything up to work off of events from the GUI so that once you call > show(), the user can click on > various things and trigger actions. Have you looked at the examples > in: examples/event_handling? > Well, the problem isn't there (I believe). The workflow I'd like to implement is that, for example the user does some data processing (in ipython), plots some data (I need a show() here), closes the plot window, does some other data processing (in ipython), plots other data (no show() needed here, as we're still in show() mode) *and selects some data by clicking on the plot* (I use fig.canvas.mpl_connect, as in the examples/event_handling). The last part works if it's the first time I'm show()ing a plot, but not the second time, and, looking at the tracebacks, it seems that this is because the first time, the program waits for the window to be closed to continue (so it can access the data it retrieves from the button_press_events), but the second time, it doesn't -- so of course it tries to access undefined variables. So basically, what I want (if I am not mistaken about the origin of the problem) is to have blocking calls again for my second plot. Buf ioff() isn't sufficient for this, either (which is not a surprise as show() does more than ion()). Probably at some point I'll have to rewrite the whole lot for a specific backend, but I'd like to stick to a pure matplotlib solution as for now. Thanks in advance, Antony > > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > |
|
From: Ryan M. <rm...@gm...> - 2010-04-20 21:59:42
|
On Tue, Apr 20, 2010 at 4:44 PM, Antony Lee <ant...@en...> wrote: > That would be a solution, indeed. However, is there really no way of coming > back to a pre-plt.show() state once all windows are closed? What kind of > irreversible things does plt.show() do? It starts the GUI toolkit event loop, which starts to make things messy if you try to call show() again. It often works, but calling show() more than once is most-definitely not supported. Now, depending on what exactly you're trying to do, you can set everything up to work off of events from the GUI so that once you call show(), the user can click on various things and trigger actions. Have you looked at the examples in: examples/event_handling? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Antony L. <ant...@en...> - 2010-04-20 21:44:08
|
That would be a solution, indeed. However, is there really no way of coming back to a pre-plt.show() state once all windows are closed? What kind of irreversible things does plt.show() do? Thanks, Antony 2010/4/20 Ryan May <rm...@gm...> > On Tue, Apr 20, 2010 at 11:38 AM, Antony Lee <ant...@en...> wrote: > > Hello, > > > > I'm currently writing a specialized image processing package using > > Matplotlib. The goal would be to let users use it interactively from an > > ipython console. > > So I have some functions for selecting points on plots (via > > "button_press_event"), and others for data plotting (and also for data > > processing, of course). When the user calls a plotting or a > > point-selecting function, I have to call plt.show() at the end of it... > but > > then this seems to do something irreversible which cannot be cancelled > > e.g. by plt.ioff(). But at the same time I can't stay in show() mode > > forever, because if I did so, the program would fail when the user calls > > another point-selecting function (as the call to the point-selecting > > function becomes non-blocking, Python raises an error when the yet > undefined > > coordinates are read in a following part of the enclosing function). (For > > the same reason, trying to use ipython -pylab leads to failure starting > > from the *first* call to a point-selecting function (instead of the > second > > when using ipython).) > > (And I can't use plt.ginput as I sometimes want to update the plot using > > some home-made functions while the user selects data on it). > > So I have to find a way of showing the plot(s) to the user, and still > come > > back to pre- plt.show() mode after (of course, if there was a way to show > > the plots without calling plt.show(), that would work too)... I believe > this > > is a "classic" question, but I haven't found an answer to it. So does > anyone > > have an idea about it? > > What you really need is to have ipython integrated into your GUI's > event loop (which is started with show). You might want to look at > http://code.google.com/p/spyderlib/ or Google around for some other > packages that integrate IPython into a GUI. > > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Ryan M. <rm...@gm...> - 2010-04-20 18:15:03
|
> I don't know what your Google search results page presented, but the the > second entry on the first search results page, for me, was the following: > > Cookbook/Matplotlib - > Feb 12, 2010 ... Show colormaps - Small script to display all of the > Matplotlib colormaps, and an exampleshowing how to create a new one. ... > www.scipy.org/Cookbook/Matplotlib - Cached The way he worded it to me meant colormaps mapping certain values to distinct colors, which was not (as far as I saw) covered by the first two links. It turns out I was wrong, but the point still stands: if we have new users asking sensible questions and actually making a good effort, we don't want to discourage them. Now for those who want there hands held every step of the way I'm all for snarking at. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: <tom...@gm...> - 2010-04-20 17:39:16
|
Hello everyone,
if I read a column file like this (simplified to integers):
0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6
with: "data = np.loadtxt("fileName")", why can't I use a for loop inside ipython (started with "-pylab" option) to plot each of the Line2D objects and then draw them on the plot? I am using matplotlib to debug a computational geometry code and I would like these lines to plot paused by the user input so that I can identify when (where) exactly the wrong calculations happen:
import numpy as np
import matplotlib.pyplot as plt
fig1 = plt.figure()
ax1 = fig1.add_subplot(111)
ax1.set_aspect("equal")
for line in data:
raw_input("press enter to plot the line")
ax1.plot([line[0],line[2]],[line[1],line[3]],'b')
plt.draw()
This way I could see with pressing e.g. the return key when my calculations go wrong.... any advice?
|
|
From: Ryan M. <rm...@gm...> - 2010-04-20 16:58:24
|
On Tue, Apr 20, 2010 at 11:38 AM, Antony Lee <ant...@en...> wrote: > Hello, > > I'm currently writing a specialized image processing package using > Matplotlib. The goal would be to let users use it interactively from an > ipython console. > So I have some functions for selecting points on plots (via > "button_press_event"), and others for data plotting (and also for data > processing, of course). When the user calls a plotting or a > point-selecting function, I have to call plt.show() at the end of it... but > then this seems to do something irreversible which cannot be cancelled > e.g. by plt.ioff(). But at the same time I can't stay in show() mode > forever, because if I did so, the program would fail when the user calls > another point-selecting function (as the call to the point-selecting > function becomes non-blocking, Python raises an error when the yet undefined > coordinates are read in a following part of the enclosing function). (For > the same reason, trying to use ipython -pylab leads to failure starting > from the *first* call to a point-selecting function (instead of the second > when using ipython).) > (And I can't use plt.ginput as I sometimes want to update the plot using > some home-made functions while the user selects data on it). > So I have to find a way of showing the plot(s) to the user, and still come > back to pre- plt.show() mode after (of course, if there was a way to show > the plots without calling plt.show(), that would work too)... I believe this > is a "classic" question, but I haven't found an answer to it. So does anyone > have an idea about it? What you really need is to have ipython integrated into your GUI's event loop (which is started with show). You might want to look at http://code.google.com/p/spyderlib/ or Google around for some other packages that integrate IPython into a GUI. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Jim V. <Jim...@no...> - 2010-04-20 16:40:38
|
Nikolaus Rath wrote: > Hello, > > Maybe my googling skills are deficient, but I wasn't able to find any > information on how to define my own colormap. > > Can someone give me a pointer, or a basic example how to create a simple > map that e.g. maps -1 to Red, 0 to White, and 1 to Blue? > > Thanks, > > -Nikolaus > > http://lmgtfy.com/?q=matplotlib+colormaps |
|
From: Antony L. <ant...@en...> - 2010-04-20 16:39:06
|
Hello, I'm currently writing a specialized image processing package using Matplotlib. The goal would be to let users use it interactively from an ipython console. So I have some functions for selecting points on plots (via "button_press_event"), and others for data plotting (and also for data processing, of course). When the user calls a plotting or a point-selecting function, I have to call plt.show() at the end of it... but then this seems to do something irreversible which cannot be cancelled e.g. by plt.ioff(). But at the same time I can't stay in show() mode forever, because if I did so, the program would fail when the user calls another point-selecting function (as the call to the point-selecting function becomes non-blocking, Python raises an error when the yet undefined coordinates are read in a following part of the enclosing function). (For the same reason, trying to use ipython -pylab leads to failure starting from the *first* call to a point-selecting function (instead of the second when using ipython).) (And I can't use plt.ginput as I sometimes want to update the plot using some home-made functions while the user selects data on it). So I have to find a way of showing the plot(s) to the user, and still come back to pre- plt.show() mode after (of course, if there was a way to show the plots without calling plt.show(), that would work too)... I believe this is a "classic" question, but I haven't found an answer to it. So does anyone have an idea about it? Thanks in advance, Antony |
|
From: Nikolaus R. <Nik...@ra...> - 2010-04-20 16:23:05
|
Hello, Maybe my googling skills are deficient, but I wasn't able to find any information on how to define my own colormap. Can someone give me a pointer, or a basic example how to create a simple map that e.g. maps -1 to Red, 0 to White, and 1 to Blue? Thanks, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C |
|
From: Gökhan S. <gok...@gm...> - 2010-04-20 16:11:08
|
On Tue, Apr 20, 2010 at 2:42 AM, Matthias Michler <Mat...@gm...>wrote: > Hi Gökhan, > > thanks for testing this small patch. Maybe one of the developers could > submit > it or should I place it on the patch-tracker? > > Usually after some pinging someone picks up the code and commits in to the svn. > About the toggling of all grid-lines using > event.inaxes.grid(which='majorminor') > I not sure this is intended, because this means that you will allways > toggling > major and minor tick - grid lines using key 'g' instead of only toggling > major tick grid lines. Maybe a developer or other users could comment on > the > preferred behavior. > Just create a simple plot and log-log x,y-axes and try hitting "g". Both minor and major gridlines must be visible to get a clear view. In some cases grids clutter the figure instead of helping. In my previous post, the main point was change in event.inaxes.grid(which='majorminor') doesn't really work as expected. Could you at least check that behavior? > > Kind regards, > Matthias > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Gökhan |
|
From: Nikolaus R. <Nik...@ra...> - 2010-04-20 15:07:40
|
On 04/20/2010 10:29 AM, Ryan May wrote:
> On Tue, Apr 20, 2010 at 8:58 AM, Nikolaus Rath <Nik...@ra...> wrote:
>> Hello,
>>
>> I'm trying to plot something from 0 to 2pi:
>>
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> ax.set_title('Radial Magnetic Field')
>> ax.set_ylabel(r'Poloidal Angle $\theta$')
>> ax.set_xlabel(r'Toroidal Angle $\phi$')
>>
>> ax.set_xticks([0, 2 * math.pi])
>> ax.set_xticklabels(['0', r'$2\pi$'])
>> ax.set_yticklabels([r'$-\pi$', r'$\pi$'])
>> ax.set_yticks([-math.pi, math.pi])
>>
>> ax.set_xlim(xmin=0, xmax=2 * math.pi)
>> ax.set_ylim(ymin= -math.pi, ymax=math.pi)
>
> I don't see the problem here, I get the ticks as specified. What
> version of matplotlib are you using? What backend are you using?
Actually, now that I tried it again, it suddenly works. Strange... Sorry
for the pointless mail.
Best,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
|
|
From: Michael D. <md...@st...> - 2010-04-20 14:49:37
|
That's great news -- glad we got to the bottom of it, though I'm not
sure how your system may have become wedged like that in the first
place. I should have thought of this earlier, but if it happens again,
can you send me your fontList.cache file so I can inspect it? There may
be a bug in the font lookup code there.
Cheers,
Mike
william ratcliff wrote:
> Progress:
>
> c:\python25\lib\site-packages\matplotlib\mathtext.py:848: MathTextWarning:
> Font 'rm' does not have a glyph for '\perp'
> MathTextWarning)
> c:\python25\lib\site-packages\matplotlib\mathtext.py:849: MathTextWarning:
> Substituting with a dummy symbol.
> warn("Substituting with a dummy symbol.", MathTextWarning)
>
> ----
>
> Next, I followed your suggestion and deleted the fontlist.cache file and
> that solved everything. Thanks!!!
>
> So, that's where the dummy symbol is coming from.
>
> On Mon, Apr 19, 2010 at 3:42 PM, Michael Droettboom <md...@st...> wrote:
>
>
>> Hmm... I'm a bit stumped. Can you print out the values of these from your
>> script, i.e. put the following at the top:
>>
>> from matplotlib import rcParams
>> print rcParams['mathtext.fontset']
>> print rcParams['mathtext.default']
>>
>> Can you try deleting your fontList.cache file?
>>
>> Mike
>>
>>
>> william ratcliff wrote:
>>
>>
>>> From my mpl-data directory, here's what's in the mathtext section of my
>>> matplotlibrc file:
>>> # The following settings allow you to select the fonts in math mode.
>>> # They map from a TeX font name to a fontconfig font pattern.
>>> # These settings are only used if mathtext.fontset is 'custom'.
>>> # Note that this "custom" mode is unsupported and may go away in the
>>> # future.
>>> #mathtext.cal : cursive
>>> #mathtext.rm : serif
>>> #mathtext.tt : monospace
>>> #mathtext.it : serif:italic
>>> #mathtext.bf : serif:bold
>>> #mathtext.sf : sans
>>> #mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix',
>>> # 'stixsans' or 'custom'
>>> mathtext.fallback_to_cm : True # When True, use symbols from the Computer
>>> Modern
>>> # fonts when a symbol can not be found in one of
>>> # the custom math fonts.
>>>
>>> #mathtext.default : it # The default font to use for math.
>>> # Can be any of the LaTeX font names, including
>>> # the special name "regular" for the same font
>>>
>>>
>>> On Mon, Apr 19, 2010 at 2:40 PM, Michael Droettboom <md...@st...>
>>> wrote:
>>>
>>>
>>>
>>>
>>>> The puzzling thing is this:
>>>>
>>>>
>>>> u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF'
>>>>
>>>> It's using a custom font in mathtext. Are you setting the rcParams
>>>> mathtext.fontset or mathtext.default? That may the culprit, and if not,
>>>> it's a bug that it's trying to use that font.
>>>>
>>>>
>>>> Mike
>>>>
>>>> william ratcliff wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> On the plus side, there is no longer an error when I apply the patch.
>>>>> On
>>>>> the downside, it generates a rather strange symbol instead of a
>>>>> perpendicular symbol....Let me try to quickly upgrade to 0.99.1. I did
>>>>> that
>>>>> and I seem to get the same error...
>>>>>
>>>>> On Mon, Apr 19, 2010 at 10:49 AM, Michael Droettboom <md...@st...
>>>>>
>>>>>
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>> Does forcibly casting the path to a string resolve the problem? i.e.
>>>>>> applying this patch:
>>>>>>
>>>>>> Index: mathtext.py
>>>>>> ===================================================================
>>>>>> --- mathtext.py (revision 8216)
>>>>>> +++ mathtext.py (working copy)
>>>>>> @@ -597,7 +597,7 @@
>>>>>>
>>>>>> cached_font = self._fonts.get(basename)
>>>>>> if cached_font is None:
>>>>>> - font = FT2Font(basename)
>>>>>> + font = FT2Font(str(basename))
>>>>>> cached_font = self.CachedFont(font)
>>>>>> self._fonts[basename] = cached_font
>>>>>> self._fonts[font.postscript_name] = cached_font
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>> william ratcliff wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Mike,
>>>>>>>
>>>>>>> The basename is:
>>>>>>> u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF'
>>>>>>>
>>>>>>> Let me try to find where my matplotlibrc file is located...
>>>>>>>
>>>>>>> Thanks,
>>>>>>> William
>>>>>>>
>>>>>>> On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom <md...@st...
>>>>>>> <mailto:
>>>>>>> md...@st...>> wrote:
>>>>>>>
>>>>>>> One might see that error if the path to the font being used
>>>>>>> contains non-ascii characters (the "basename" variable in the last
>>>>>>> frame of the stack in the stacktrace). Is that possible? We may
>>>>>>> need to implement the same workaround we use for image files for
>>>>>>> loading fonts (which is to open the file with Python and pass a
>>>>>>> file handle to C++ rather than passing a string that may contain
>>>>>>> Unicode, which is difficult to handle in cross-platform way from
>>>>>>> C/C++).
>>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>> william ratcliff wrote:
>>>>>>>
>>>>>>> I think the actual error was:
>>>>>>> TypeError: cannot return std::string from Unicode object
>>>>>>>
>>>>>>> It was the error returned when I walked through with a
>>>>>>> debugger...
>>>>>>>
>>>>>>> On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom
>>>>>>> <md...@st... <mailto:md...@st...>
>>>>>>> <mailto:md...@st... <mailto:md...@st...>>> wrote:
>>>>>>>
>>>>>>> It looks like the end of the traceback -- where the actual
>>>>>>> exception is named -- is missing. Can you repost it in its
>>>>>>> entirety?
>>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>> william ratcliff wrote:
>>>>>>>
>>>>>>> Hi! I am using matplotlib 0.99.0 under windows xp. I
>>>>>>> tried
>>>>>>> the following:
>>>>>>> ax.text(.96,.80,r'$P \perp
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black')
>>>>>>> and get the following error:
>>>>>>> (However, in figure labels, symbols using mathtext, such
>>>>>>> as
>>>>>>> theta seem to work fine...)
>>>>>>>
>>>>>>> Thanks,
>>>>>>> William
>>>>>>>
>>>>>>> TypeError: cannot return std::string from Unicode object
>>>>>>> File
>>>>>>>
>>>>>>>
>>>>>>> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py",
>>>>>>> line 301, in <module>
>>>>>>> film110()
>>>>>>> File
>>>>>>>
>>>>>>>
>>>>>>> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py",
>>>>>>> line 157, in film110
>>>>>>> plt.show()
>>>>>>> File
>>>>>>>
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py",
>>>>>>> line 63, in show
>>>>>>> manager.window.show()
>>>>>>> File
>>>>>>>
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py",
>>>>>>> line 168, in resizeEvent
>>>>>>> self.draw()
>>>>>>> File
>>>>>>>
>>>>>>>
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py",
>>>>>>> line 130, in draw
>>>>>>> FigureCanvasAgg.draw(self)
>>>>>>> File
>>>>>>>
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py",
>>>>>>> line 314, in draw
>>>>>>> self.figure.draw(self.renderer)
>>>>>>> File "C:\Python25\Lib\site-packages\matplotlib\artist.py",
>>>>>>> line 46, in draw_wrapper
>>>>>>> draw(artist, renderer, *kl)
>>>>>>> File "C:\Python25\Lib\site-packages\matplotlib\figure.py",
>>>>>>> line 774, in draw
>>>>>>> for a in self.axes: a.draw(renderer)
>>>>>>> File "C:\Python25\Lib\site-packages\matplotlib\artist.py",
>>>>>>> line 46, in draw_wrapper
>>>>>>> draw(artist, renderer, *kl)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\axes.py", line
>>>>>>> 1721, in draw
>>>>>>> a.draw(renderer)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\text.py", line
>>>>>>> 515, in draw
>>>>>>> bbox, info = self._get_layout(renderer)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\text.py", line
>>>>>>> 279, in _get_layout
>>>>>>> clean_line, self._fontproperties, ismath=ismath)
>>>>>>> File
>>>>>>>
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py",
>>>>>>> line 156, in get_text_width_height_descent
>>>>>>> self.mathtext_parser.parse(s, self.dpi, prop)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 2810, in parse
>>>>>>> box = self._parser.parse(s, font_output, fontsize, dpi)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 2259, in parse
>>>>>>> self._expression.parseString(s)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 1048, in parseString
>>>>>>> loc, tokens = self._parse( instring, 0 )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2559, in parseImpl
>>>>>>> return self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2307, in parseImpl
>>>>>>> loc, exprtokens = e._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2672, in parseImpl
>>>>>>> loc, tokens = self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2307, in parseImpl
>>>>>>> loc, exprtokens = e._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2756, in parseImpl
>>>>>>> loc, tokens = self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2714, in parseImpl
>>>>>>> loc, tmptokens = self.expr._parse( instring, preloc,
>>>>>>> doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2373, in parseImpl
>>>>>>> return maxMatchExp._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2559, in parseImpl
>>>>>>> return self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2416, in parseImpl
>>>>>>> ret = e._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2559, in parseImpl
>>>>>>> return self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2559, in parseImpl
>>>>>>> return self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2416, in parseImpl
>>>>>>> ret = e._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2293, in parseImpl
>>>>>>> loc, resultlist = self.exprs[0]._parse( instring, loc,
>>>>>>> doActions, callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2756, in parseImpl
>>>>>>> loc, tokens = self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2559, in parseImpl
>>>>>>> return self.expr._parse( instring, loc, doActions,
>>>>>>> callPreParse=False )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2373, in parseImpl
>>>>>>> return maxMatchExp._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 924, in _parseNoCache
>>>>>>> loc,tokens = self.parseImpl( instring, preloc, doActions
>>>>>>> )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 2416, in parseImpl
>>>>>>> ret = e._parse( instring, loc, doActions )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 981, in _parseCache
>>>>>>> value = self._parseNoCache( instring, loc, doActions,
>>>>>>> callPreParse )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
>>>>>>> line 950, in _parseNoCache
>>>>>>> tokens = fn( instring, tokensStart, retTokens )
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 2374, in symbol
>>>>>>> char = Char(c, self.get_state())
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 1264, in __init__
>>>>>>> self._update_metrics()
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 1271, in _update_metrics
>>>>>>> self.font, self.font_class, self.c, self.fontsize,
>>>>>>> self.dpi)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 446, in get_metrics
>>>>>>> info = self._get_info(font, font_class, sym, fontsize,
>>>>>>> dpi)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 579, in _get_info
>>>>>>> self._get_glyph(fontname, font_class, sym, fontsize)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 697, in _get_glyph
>>>>>>> fontname, font_class, sym, fontsize)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 827, in _get_glyph
>>>>>>> cached_font = self._get_font(new_fontname)
>>>>>>> File
>>>>>>> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
>>>>>>> line 560, in _get_font
>>>>>>> font = FT2Font(basename)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Download Intel® Parallel Studio Eval
>>>>>>> Try the new software tools for yourself. Speed
>>>>>>> compiling, find
>>>>>>> bugs
>>>>>>> proactively, and fine-tune applications for parallel
>>>>>>> performance.
>>>>>>> See why Intel Parallel Studio got high marks during beta.
>>>>>>> http://p.sf.net/sfu/intel-sw-dev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Matplotlib-users mailing list
>>>>>>> Mat...@li...
>>>>>>> <mailto:Mat...@li...>
>>>>>>> <mailto:Mat...@li...
>>>>>>> <mailto:Mat...@li...>>
>>>>>>>
>>>>>>>
>>>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>>>>
>>>>>>> -- Michael Droettboom
>>>>>>> Science Software Branch
>>>>>>> Operations and Engineering Division
>>>>>>> Space Telescope Science Institute
>>>>>>> Operated by AURA for NASA
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- Michael Droettboom
>>>>>>> Science Software Branch
>>>>>>> Operations and Engineering Division
>>>>>>> Space Telescope Science Institute
>>>>>>> Operated by AURA for NASA
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Michael Droettboom
>>>>>> Science Software Branch
>>>>>> Operations and Engineering Division
>>>>>> Space Telescope Science Institute
>>>>>> Operated by AURA for NASA
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> --
>>>> Michael Droettboom
>>>> Science Software Branch
>>>> Operations and Engineering Division
>>>> Space Telescope Science Institute
>>>> Operated by AURA for NASA
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> --
>> Michael Droettboom
>> Science Software Branch
>> Operations and Engineering Division
>> Space Telescope Science Institute
>> Operated by AURA for NASA
>>
>>
>>
>
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Ryan M. <rm...@gm...> - 2010-04-20 14:36:08
|
On Tue, Apr 20, 2010 at 8:58 AM, Nikolaus Rath <Nik...@ra...> wrote:
> Hello,
>
> I'm trying to plot something from 0 to 2pi:
>
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.set_title('Radial Magnetic Field')
> ax.set_ylabel(r'Poloidal Angle $\theta$')
> ax.set_xlabel(r'Toroidal Angle $\phi$')
>
> ax.set_xticks([0, 2 * math.pi])
> ax.set_xticklabels(['0', r'$2\pi$'])
> ax.set_yticklabels([r'$-\pi$', r'$\pi$'])
> ax.set_yticks([-math.pi, math.pi])
>
> ax.set_xlim(xmin=0, xmax=2 * math.pi)
> ax.set_ylim(ymin= -math.pi, ymax=math.pi)
I don't see the problem here, I get the ticks as specified. What
version of matplotlib are you using? What backend are you using?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: Nikolaus R. <Nik...@ra...> - 2010-04-20 14:20:17
|
Hello,
I'm trying to plot something from 0 to 2pi:
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title('Radial Magnetic Field')
ax.set_ylabel(r'Poloidal Angle $\theta$')
ax.set_xlabel(r'Toroidal Angle $\phi$')
ax.set_xticks([0, 2 * math.pi])
ax.set_xticklabels(['0', r'$2\pi$'])
ax.set_yticklabels([r'$-\pi$', r'$\pi$'])
ax.set_yticks([-math.pi, math.pi])
ax.set_xlim(xmin=0, xmax=2 * math.pi)
ax.set_ylim(ymin= -math.pi, ymax=math.pi)
But unfortunately the ticks for x=2pi and y=pi are not shown. They do
show up if I move them a tiny bit:
ax.set_xticks([0, 2 * math.pi * 0.98])
ax.set_yticks([-math.pi, math.pi * 0.98])
But obviously this is ugly.
Is there a way to show the labels without moving the to the wrong
position and without extending the axis limits (since that introduces a
white border)?
Best,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
|
|
From: Ryan M. <rm...@gm...> - 2010-04-20 14:19:35
|
On Tue, Apr 20, 2010 at 8:56 AM, Nikolaus Rath <Nik...@ra...> wrote: > Hello, > > When I'm calling the pyplot.plot function from ipython, I get a nice > dialog in which I can zoom, pan & save. > > How can I achieve the same thing from a non-interactive program? > > I tried > > fig = plt.figure() > ax = fig.add_subplot(111) > ax.contourf(stuff) > fig.show() Use plt.show() instead of fig.show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Nikolaus R. <Nik...@ra...> - 2010-04-20 14:12:10
|
Hello,
When I'm calling the pyplot.plot function from ipython, I get a nice
dialog in which I can zoom, pan & save.
How can I achieve the same thing from a non-interactive program?
I tried
fig = plt.figure()
ax = fig.add_subplot(111)
ax.contourf(stuff)
fig.show()
but this program terminates without showing anything. Is there a
function that I can call that shows up the interactive window and only
returns once I close the window?
Thanks,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
|
|
From: xhbhyq11 <xhb...@16...> - 2010-04-20 10:10:09
|
Hi:
I install matplotlib under Red hat Linux .But I can't find Tkinter, can't use TkAgg.I install python is ActivePython6.5.
please tell me how to do! Thank you!
|
|
From: Yves R. <yve...@ep...> - 2010-04-20 07:35:51
|
Ok, great, it works ! However, I do not understand why latex mode is disabled by default... Anyway, thanks a lot, yves Jae-Joon Lee wrote: > I'm not sure if the default formatter needs to be changed. > However, you may try > > import matplotlib.ticker as ticker > formatter=ticker.LogFormatterMathtext() > colorbar(format=formatter) > > which will render colorbar ticklabels with mathtext mode. > > Regards, > > -JJ > > > On Fri, Apr 16, 2010 at 3:56 AM, Yves Revaz <yve...@ep...> wrote: > >> Dear list, >> >> I want to plot colored points using scatter, with the >> color of points corresponding to the log of the z value of the points. >> >> the corresponding scatter command is : >> >> scatter(x,y,c=z,norm=colors.LogNorm()) >> >> unfortunately, then I then draw a colorbar simply calling >> >> colorbar() >> >> the fonts used for the color bar is no longer in latex mode, >> as it was if I use a lin scale in scatter(), i.e., norm=None. >> >> >> Is it a bug ? >> >> Any solution ? >> >> Thanks, >> >> yves >> >> >> >> >> -- >> (o o) >> --------------------------------------------oOO--(_)--OOo------- >> Dr. Yves Revaz >> Laboratory of Astrophysics EPFL >> Observatoire de Sauverny Tel : ++ 41 22 379 24 28 >> 51. Ch. des Maillettes Fax : ++ 41 22 379 22 05 >> 1290 Sauverny e-mail : Yve...@ep... >> SWITZERLAND Web : http://www.lunix.ch/revaz/ >> ---------------------------------------------------------------- >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> -- (o o) --------------------------------------------oOO--(_)--OOo------- Dr. Yves Revaz Laboratory of Astrophysics EPFL Observatoire de Sauverny Tel : ++ 41 22 379 24 28 51. Ch. des Maillettes Fax : ++ 41 22 379 22 05 1290 Sauverny e-mail : Yve...@ep... SWITZERLAND Web : http://www.lunix.ch/revaz/ ---------------------------------------------------------------- |
|
From: Vamsi V. <vam...@gm...> - 2010-04-20 05:09:09
|
Thanks for your reply Mike. Looks like fig.add_axes(..) works the best for
me for now. If my situation gets worse I will try and look into calls that
allocate window area for the figure/canvas in a container.
Thanks again!
On Mon, Apr 19, 2010 at 6:03 AM, Michael Droettboom <md...@st...> wrote:
> The problem is really that the window is too small, the text is too large,
> and/or the axes is too large within the figure.
>
> Try one or more of the following:
>
> Replace the values for win.set_default_size to something larger, eg.
>
> win.set_default_size(800,600)
>
> Replace the fig.add_subplot call with a fig.add_axes call that explicitly
> specifies the axes position:
>
> ax = fig.add_axes((0.2, 0.2, 0.6, 0.6))
>
> Reduce the font size by adding the following to the top:
>
> from matplotlib import rcParams
> rcParams['font.size'] = 4
>
> Reduce the dpi of the plot:
>
> fig = Figure(figsize=(5,4), dpi=60)
>
> Cheers,
> Mike
>
> Vamsi Vytla wrote:
>
>> Adding line:
>> ax.set_xlabel("asdf")
>>
>> To file (matplotlib examples):
>>
>> http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk2.py
>>
>> This sets the X-Label under the navigation toolbar. I am unable to set it
>> such a way that the entire canvas is rendered in the container.
>>
>> It would be of great help to know how this can be done.
>>
>> Thanks,
>> W
>> ------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
|