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
(11) |
2
(24) |
3
(24) |
4
(31) |
5
(30) |
6
(27) |
7
(25) |
8
(8) |
9
(2) |
10
(12) |
11
(16) |
12
(33) |
13
(18) |
14
(17) |
15
(3) |
16
(7) |
17
(8) |
18
(22) |
19
(20) |
20
(25) |
21
(10) |
22
(17) |
23
(18) |
24
(23) |
25
(15) |
26
(19) |
27
(6) |
28
(7) |
29
(6) |
30
(1) |
31
(12) |
|
|
|
|
|
From: Erik S. <oth...@gm...> - 2009-08-21 16:12:58
|
Hello all, This may be a difficult post to respond to in the whole, but any pointers would be appreciated. My overall goal is to generate contour plots for a wide range of input data. The data points are not regularly spaced and do not align to any grid. The data points represent measurements taken from a model that can take on a variety of shapes. To make matters more difficult, I'd prefer not to interpolate around corners of the model. For example ( please forgive the ascii art ): |-----------------------| | . . . . . . . .| | . . . . . . . .| |----------------| . . .| |. .| |. . .| |------| In the model above the edges denoted by "|" and "-", data points denoted by ".". This is a simple L shape with random data points sampled. For the most part, the approaches I've taken have worked, but I am hitting some difficult conditions to debug. Most unnerving are some artifacts in the plot even though the data values are fairly uniform (see attached image "fail.png" ). The general approach I'm taking goes as follows: 1 ) Make a linear space for the x and y components of the data and the model ( def_points_x is unique and sorted sorted in the code example ): # model boundary points x x_def = linspace( def_points_x[0], def_points_x[-1], self.num_points_x ) # do something similar for x and y of data and model points 2) Triangulate on the points try: ltri = delaunay.Triangulation( array( xPoints ), array( yPoints ) ) # xPoints and yPoints are data points except: ltri = ( None, None, None ) 3) use the natural neighbor extrapolator if extrapolate: # extrapolate try: interp_extrap = ltri.nn_extrapolator( region_values ) # values for the data points in same order ( i.e., ( xPoints[1], yPoints[1] ) -> region_values[1] ) except: return ( None, None, None) 4) extrapolate to the model boundary x2,y2 = meshgrid( x_def, y_def ) # model boundary region z = interp_extrap( x2, y2 ) 5) plot the result contourf( x_def, y_def, z, linspace( minValue, maxValue, self.numberOfContourLevels ), zorder = 50, extend = 'both' ) I've attached two images, one showing a nice result and one showing artifacts. Am I completely off base in this approach, hence I cannot seem to "perfect" the results? Suggestions? Thanks for reading! -Erik |
From: Jae-Joon L. <lee...@gm...> - 2009-08-21 15:38:28
|
On Fri, Aug 21, 2009 at 10:01 AM, Scott Sinclair<sco...@gm...> wrote: >> I just realized that I did not give the correct plot object when creating >> the colorbar. Now it works perfectly to pass arguments by set_xticklabels(). >> >> However, another question just arose. To format the numbers on the tick >> labels I tried to pass a format string when creating the colorbar with the >> format parameter. But it has no effect. The same when I give a >> FormatStrFormatter object. I also tried to use >> cb.ax.axis.set_major_formatter(). The effect of this was. That it sets the >> labels to the range between 0 and 1. Is there a solution for this problem >> besides entering the tick labels manually? The tick locator and tick formatter needs to be passed during the colorbar creation. Otherwise, it gets very tricky to deal with. This is because the data coordinate of the colorbar axes is not directly associated with the ticklabels. If passing the formatter during the colorbar creation has no effect, this should be filed as a bug. Please post a small standalone example that reproduces your problem. Also, please report your version of matplotlib. If you're using older version, I recommend you to test it with newer version. Just in case, my quick test worked fine. imshow([[1,2],[2,3]]) cb=colorbar(format=r"$%2.1f\%%$") -JJ |
From: Scott S. <sco...@gm...> - 2009-08-21 14:01:24
|
> 2009/8/21 Daniel Platz <mai...@go...>: > I just realized that I did not give the correct plot object when creating > the colorbar. Now it works perfectly to pass arguments by set_xticklabels(). > > However, another question just arose. To format the numbers on the tick > labels I tried to pass a format string when creating the colorbar with the > format parameter. But it has no effect. The same when I give a > FormatStrFormatter object. I also tried to use > cb.ax.axis.set_major_formatter(). The effect of this was. That it sets the > labels to the range between 0 and 1. Is there a solution for this problem > besides entering the tick labels manually? > Scott Sinclair wrote: >>> >>> 2009/8/20 Daniel Platz <mai...@go...>: >>> The setting of the new ticklabels works now. But the first label is >>> attached to the second tick. I tried to adapt the clim range by using >>> the vmin and vmax option of pcolor but it did not help. >> >> Does this help? >> >> >> http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html Hi Daniel, It's hard for me to see what's happening here without a simple standalone code example to illustrate your problem. Trying to reproduce what you're seeing with a simple example will often reveal where you're going wrong.. Also note that the default on this mailing list is not to send replies to the list. Please use "Reply to all" so that your response goes to the entire list and not directly to me, you're more likely to get a helpful response that way. I'm sending this to the list, hopefully someone can help you to resolve the issue. Cheers, Scott |
From: Werner F. B. <wer...@fr...> - 2009-08-21 11:02:38
|
I would like to have the percentage values shown in white instead of in black within a pie chart. I figured I could do something like: def reColor(percent): "I am lost here on how to format the percentage and change the color" axes.pie(values, labels=labels, autopct=reColor, shadow=False, colors=colors) I thought I could use a mpl.text.Text but I only get the percentage in "reColor". Looked at the gallery and tried to based it on the "barchart_demo2.py" example without success. Although would prefer not to have to loop through the text.Text instances and figure out which ones are a percentage and then color them - but I guess that would be one way of doing it but it looks a bit odd to me. Thanks for any tips Werner |
From: Scott S. <sco...@gm...> - 2009-08-21 05:40:30
|
> 2009/8/20 Daniel Platz <mai...@go...>: > The setting of the new ticklabels works now. But the first label is > attached to the second tick. I tried to adapt the clim range by using > the vmin and vmax option of pcolor but it did not help. Does this help? http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html Cheers, Scott > Jouni K. Seppänen wrote: >> Daniel Platz <mai...@go...> writes: >> >>> t = cb4.ax.get_xticklabels() >>> for j in t: >>> j.set_text(r'$\pi$') >>> j.set_fontsize(10) >>> j.set_family('serif') >> >> Try cb4.ax.set_xticklabels([r'$-\pi$', ...]); draw() >> >>> Another problem is that I want to adjust the fontsize of the colorbar >>> ticklabels on four subplots. This only works for the last two subplots >>> with the syntax shown above. The same syntax has no effect on the first >>> two subplots. >> >> You should be able to pass font properties to set_xticklabels. If that >> doesn't work, please post a complete example. |
From: <jas...@cr...> - 2009-08-20 23:58:34
|
Justin Findlay wrote: > I'm trying to find a way to embed matplotlib graphs in LaTeX > documents. Ideally a solution would involve converting MPL's output > to TikZ in order to get native rendering of the graphics and text. > This seems like the "Right Way" to go, unfortunately, my classes start > on Monday, and I'm neither python nor TeX guru enough to begin a > project so ambitious and important. This is what I have done so far, > benevolent user that I am, > > https://sourceforge.net/tracker/?func=detail&aid=2841217&group_id=80706&atid=560723 > > If anyone has more information on this or code to this effect I would > be very interested in learning/contributing. > Last year I spent an evening trying to modify the ps or pdf backends to be a PGF/TIKZ backend. I wasn't very successful, but I was also trying to learn the system too. It seems like it would be easy to implement the few primitives in PGF instead of postscript, since the models are pretty similar, from what I recall. I haven't spent the time to revisit it, though, and it probably won't make it back to the top of my list for a while. For those trying to pursue this, the PGF documentation is handy: http://www.ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf See p. 439 and p. 461 for commands for drawing paths with the "basic" layer, for example. Jason -- Jason Grout |
From: Justin F. <jfi...@gm...> - 2009-08-20 22:36:31
|
On Thu, Aug 20, 2009 at 3:56 PM, John Hunter<jd...@gm...> wrote: > What's wrong with including the ps/eps output in your latex docs, or > the pdf output for your pdflatex docs? That's what most people do. > You can enable the "usetex" option if you want tex to render the text The difference is subtle. By having the graphics and text rendered by the different system they will end up having a different 'look'. I know that usetex solves most of the text-in-graphics issues, and that TeX wasn't even designed to really layout anything but text and the most minimal vector graphics, but TikZ is more than adequate for plots and stands on its own merit as a fully-featured graphics language. TeX+TikZ finally eliminates the need for external vector hackery. Of course, I'll probably just use pdf and usetex as you suggest, but I was hoping for something better. Justin (stupid gmail reply to defaults) |
From: John H. <jd...@gm...> - 2009-08-20 21:56:24
|
On Thu, Aug 20, 2009 at 4:08 PM, Justin Findlay<jfi...@gm...> wrote: > I'm trying to find a way to embed matplotlib graphs in LaTeX > documents. Ideally a solution would involve converting MPL's output > to TikZ in order to get native rendering of the graphics and text. > This seems like the "Right Way" to go, unfortunately, my classes start > on Monday, and I'm neither python nor TeX guru enough to begin a > project so ambitious and important. This is what I have done so far, > benevolent user that I am, What's wrong with including the ps/eps output in your latex docs, or the pdf output for your pdflatex docs? That's what most people do. You can enable the "usetex" option if you want tex to render the text http://matplotlib.sourceforge.net/users/usetex.html JDH |
From: Justin F. <jfi...@gm...> - 2009-08-20 21:08:29
|
I'm trying to find a way to embed matplotlib graphs in LaTeX documents. Ideally a solution would involve converting MPL's output to TikZ in order to get native rendering of the graphics and text. This seems like the "Right Way" to go, unfortunately, my classes start on Monday, and I'm neither python nor TeX guru enough to begin a project so ambitious and important. This is what I have done so far, benevolent user that I am, https://sourceforge.net/tracker/?func=detail&aid=2841217&group_id=80706&atid=560723 If anyone has more information on this or code to this effect I would be very interested in learning/contributing. Justin |
From: Daniel P. <mai...@go...> - 2009-08-20 19:19:03
|
The setting of the new ticklabels works now. But the first label is attached to the second tick. I tried to adapt the clim range by using the vmin and vmax option of pcolor but it did not help. I also still have the problem that the changes are only performed on the last two subplots (in one loop run). The code of the plotting loop is: for i in range(len(fname)): # Load data from file data1_amp = np.loadtxt(fname[4*i]) data1_phase = np.loadtxt(fname[4*i+1]) data2_amp = np.loadtxt(fname[4*i+2]) data2_phase = np.loadtxt(fname[4*i+3]) # Display data using pcolor ax1 = fig1.add_subplot(len(fname)/4,4,4*i+1) pc1 = ax1.pcolorfast(data1_amp,cmap=mpl.cm.Oranges) ax1.set_xlim((0,250)) ax1.set_ylim((0,256)) ax1.set_xticklabels('') ax1.set_yticklabels('') cb1 = fig1.colorbar(pc1,ax=ax1,orientation='horizontal',pad=0.00) cb1.ax.set_xticklabels(range(5),fontsize=10) ax2 = fig1.add_subplot(len(fname)/4,4,4*i+2) pc2 = ax2.pcolorfast(data1_phase,cmap=nat_per) ax2.set_xlim((0,250)) ax2.set_ylim((0,256)) ax2.set_xticklabels('') ax2.set_yticklabels('') cb2 = fig1.colorbar(pc2,ax=ax2,orientation='horizontal',pad=0.00, ticks=[-np.pi,-np.pi/2,0,np.pi/2,np.pi]) cb2.ax.set_xticklabels(range(5),fontsize=10) ax3 = fig1.add_subplot(len(fname)/4,4,4*i+3) pc3 = ax3.pcolorfast(data2_amp,cmap=mpl.cm.Oranges) ax3.set_xlim((0,250)) ax3.set_ylim((0,256)) ax3.set_xticklabels('') ax3.set_yticklabels('') cb3 = fig1.colorbar(pc1,ax=ax3,orientation='horizontal',pad=0.00) cb3.ax.set_xticklabels(range(5),fontsize=10) ax4 = fig1.add_subplot(len(fname)/4,4,4*i+4) pc4 = ax4.pcolorfast(data2_phase,cmap=nat_per,vmin=-np.pi-0.1,vmax=np.pi+0.001) ax4.set_xlim((0,250)) ax4.set_ylim((0,256)) ax4.set_xticklabels('') ax4.set_yticklabels('') cb4 = fig1.colorbar(pc2,ax=ax4,orientation='horizontal',pad=0.00, ticks=[-np.pi, -np.pi/2, 0.0, np.pi/2, np.pi]) cb4.ax.set_xticklabels([r'$-\pi$', r'$-\frac{\pi}{2}$', r'$0$', r'$\frac{\pi}{2}$', r'$\pi$'],fontsize=10) Daniel Jouni K. Seppänen wrote: > Daniel Platz <mai...@go...> writes: > >> t = cb4.ax.get_xticklabels() >> for j in t: >> j.set_text(r'$\pi$') >> j.set_fontsize(10) >> j.set_family('serif') > > Try cb4.ax.set_xticklabels([r'$-\pi$', ...]); draw() > >> Another problem is that I want to adjust the fontsize of the colorbar >> ticklabels on four subplots. This only works for the last two subplots >> with the syntax shown above. The same syntax has no effect on the first >> two subplots. > > You should be able to pass font properties to set_xticklabels. If that > doesn't work, please post a complete example. > |
From: Dylan W. <dt...@ny...> - 2009-08-20 18:37:26
|
Hey everyone, I cannot seem to get pylab to display a plot using WXAgg. For some reason, the datapath that I set in my matplotlibrc and confirmed by checking rcParams['datapath'] is not being passed correctly to wx. Instead, it attempts to find the data (button images like subplots.png, etc.) in the directory from which I called my IDE (Stani's Python Editor), which does have an ' ./images/' subdirectory if that is at all relevant? Any ideas? I tried searching the mailing list archives (is there a good way to actually _search them_ ??), but couldn't find anyone with the same problem. Dylan Walker |
From: Jouni K. S. <jk...@ik...> - 2009-08-20 18:31:21
|
Daniel Platz <mai...@go...> writes: > t = cb4.ax.get_xticklabels() > for j in t: > j.set_text(r'$\pi$') > j.set_fontsize(10) > j.set_family('serif') Try cb4.ax.set_xticklabels([r'$-\pi$', ...]); draw() > Another problem is that I want to adjust the fontsize of the colorbar > ticklabels on four subplots. This only works for the last two subplots > with the syntax shown above. The same syntax has no effect on the first > two subplots. You should be able to pass font properties to set_xticklabels. If that doesn't work, please post a complete example. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Daniel P. <mai...@go...> - 2009-08-20 18:11:09
|
Hello, I would like to have some custom ticklabels on a colorbar. In detail, I want the four labels '-\pi', -\pi/2', '0', \pi/2', \pi'. I tried to set manually each text object obtained from cb.ax.get_xticklabels(): t = cb4.ax.get_xticklabels() for j in t: j.set_text(r'$\pi$') j.set_fontsize(10) j.set_family('serif') However, no matter what I set for text, it has no effect on the displayed figure. Another problem is that I want to adjust the fontsize of the colorbar ticklabels on four subplots. This only works for the last two subplots with the syntax shown above. The same syntax has no effect on the first two subplots. If anybody has some ideas I would be really gald about an answer. Thanks in advance Daniel |
From: Ryan M. <rm...@gm...> - 2009-08-20 16:39:05
|
On Thu, Aug 20, 2009 at 11:00 AM, DEMOLISHOR! the Demolishor < des...@gm...> wrote: > Hello all, > I suppose this is a newbie question, but why do I get these three > horizontal grid lines when I add text to my plot? I've tried repeating the > call to pyplot.grid() but that doesn't affect anything... > > #!/usr/bin/env python > > from matplotlib import pyplot > from scipy import randn > > mu, sigma = 200, 25 > x = mu + sigma*randn(10000) > > pyplot.grid(False) > n, bins, patches = pyplot.hist(x, 50, normed=1, histtype='stepfilled') > > xlim_right = pyplot.xlim()[1] > ylim_top = pyplot.ylim()[1] > > pyplot.text(xlim_right*0.8, ylim_top*0.9, 'Fit Parameters:', weight='bold', > size='large') > > pyplot.show() > > #end script > > My matplotlib version is: > > [craigb@fsul1 matplotlib]$ python > Python 2.6.2 (r262:71600, Jul 28 2009, 10:47:31) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import matplotlib > >>> matplotlib.__version__ > '0.98.5.2' > >>> I can't reproduce this with SVN head here. I don't see anything in your script that should cause this. Can you upgrade to the latest release, 0.99? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Pasadena, California, United States |
From: M. H. <mhe...@in...> - 2009-08-20 15:45:01
|
Hi, ok meanwhile I found out that this is a typical beginners error, sorry. Nevertheless, using ion(), and ioff() together with draw() works fine. What I didn't find out up to now was the funtion ginput(n=1, timeout=30, show_clicks=True) which prevents me from killing the window after every plot, so thank you John Hunter-4. Before it was even not possible to move the focus to another window without crashing the application. Now all behaves as "expected". Thank you again. John Hunter-4 wrote: > > On Tue, Aug 18, 2009 at 3:55 AM, M. Hecht<mhe...@in...> > wrote: >> The first figure is drawn without problems but after closing it (by >> clicking >> the cross in the upper >> right corner of the window) the second figure cannot be plot anymore. >> What I >> wanted to do was >> to visualize all selected files of a directory one after the other. To do >> this I want to close the old >> figure and then the new figure should com up as long as there is a file >> to >> visualize left. Unfortunaltely >> only the first figure is shown as in the simple example. >> So, what's wrong > > We don't really have support for blocking input where a program is > halted until you close the open figure, and then the next one loads. > You could write something using event handling, where on a key press > event the next figure was loaded. You may also be able to use ginput > here, which will give you a blocking input function. > > See > > http://matplotlib.sourceforge.net/users/shell.html > > http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.ginput > > http://matplotlib.sourceforge.net/users/event_handling.html > > http://matplotlib.sourceforge.net/examples/pylab_examples/ginput_demo.html > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/plot-multiple-times-in-one-script-fails-tp25020909p25064644.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: John H. <jd...@gm...> - 2009-08-20 15:04:56
|
On Thu, Aug 20, 2009 at 9:56 AM, George Nurser<gn...@go...> wrote: > Michiel, > I'm on Mac OS X 10.5. My version of Python is 2.5.2, also from python.org. > Presumably the new matplotlib does compile with 2.6.2 on 10.5? It does -- I compiled the mpl OSX binaries using python 2.6.2 (from src) from python.org on 10.5.6 with gcc 4.0.1 |
From: George N. <gn...@go...> - 2009-08-20 14:57:08
|
Michiel, I'm on Mac OS X 10.5. My version of Python is 2.5.2, also from python.org. Presumably the new matplotlib does compile with 2.6.2 on 10.5? I'm a bit reluctant to install 2.6.2 now, since we'll be moving to 10.6 ASAP here for the Exchange compatibility, and I guess I'll be want to reinstall all the python packages in i386/x86_64 architecture rather than i386/ppc for 10.6. --George Nurser. 2009/8/20 Michiel de Hoon <mjl...@ya...>: > Are you on Mac OS X 10.5 or are you on an earlier version? The error message you're seeing indicates that MAC_OS_X_VERSION_10_5 is defined, suggesting that you are on Mac OS X 10.5. But then it should be aware of CTFontRef ... Did you change anything in your Python setup? > > --Michiel. > > --- On Wed, 8/19/09, George Nurser <gn...@go...> wrote: > >> From: George Nurser <gn...@go...> >> Subject: [Matplotlib-users] mac os backend not building >> To: Mat...@li... >> Date: Wednesday, August 19, 2009, 12:23 PM >> Hi, >> I updated matplotlib to svn r 7506, but it won't build. I >> am having >> problems with the mac os backend: >> >> 10.5.8, gcc 4.0.1: >> python setup.py build install run from the >> matplotlib/matplotlib >> directory gives: >> ..... >> building 'matplotlib.backends._macosx' extension >> gcc -arch ppc -arch i386 -isysroot >> /Developer/SDKs/MacOSX10.4u.sdk >> -fno-strict-aliasing -Wno-long-double -no-cpp-precomp >> -mno-fused-madd >> -fno-common -dynamic -DNDEBUG -g -O3 >> -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I/usr/X11R6/include >> -I/usr/X11/include -I. >> -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include >> -Isrc -Iagg24/include -I. >> -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 >> -c src/_macosx.m -o >> build/temp.macosx-10.3-i386-2.5/src/_macosx.o >> src/_macosx.m:1885: error: syntax error before >> ‘setfont’ >> src/_macosx.m:1885: error: syntax error before >> ‘setfont’ >> src/_macosx.m: In function ‘setfont’:src/_macosx.m: In >> function ‘setfont’: >> src/_macosx.m:1895: error: ‘CTFontRef’ undeclared >> (first use in this function) >> >> Possibly some confusion about whether MAC_OS_X_VERSION_10_5 >> is defined?? >> >> --George Nurser. >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal >> Reports 2008 30-Day >> trial. Simplify your report design, integration and >> deployment - and focus on >> what you do best, core application coding. Discover what's >> new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > |
From: Jouni K. S. <jk...@ik...> - 2009-08-20 14:35:14
|
Michael Fitzgerald <ast...@gm...> writes: > Can anyone confirm this bug? I have added it to the sourceforge > tracker, ID 2832896. > https://sourceforge.net/tracker/?func=detail&aid=2832896&group_id=80706&atid=560720 I can see it but haven't been able to make time to investigate yet. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Jouni K. S. <jk...@ik...> - 2009-08-20 14:32:06
|
Michiel de Hoon <mjl...@ya...> writes: > Are you on Mac OS X 10.5 or are you on an earlier version? The error > message you're seeing indicates that MAC_OS_X_VERSION_10_5 is defined, > suggesting that you are on Mac OS X 10.5. But then it should be aware > of CTFontRef ... Did you change anything in your Python setup? I get the same error on OS X 10.5.8, gcc 4.0.1, Python 2.5.4 downloaded from python.org. The failing command is: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/_macosx.m -o build/temp.macosx-10.3-i386-2.5/src/_macosx.o Note the MacOSX10.4u.sdk in the isysroot and macosx-10.3 in the name of the build directory. I suspect that this build of Python has been compiled with some kind of compatibility settings to be usable on earlier versions of the OS. Simply replacing 10.4 by 10.5 in the isysroot option causes worse errors: src/_macosx.m:1:25: error: Cocoa/Cocoa.h: No such file or directory src/_macosx.m:2:53: error: ApplicationServices/ApplicationServices.h: No such file or directory Can you suggest something further to try? -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Kim, Dae-W. <dw...@gm...> - 2009-08-20 14:26:54
|
I tested with TKAgg and WXAgg. I just bought macbook and I'm newbie yet. Do I need to set something special for the multiple show()s? Thanks, -Dae-Won On Thu, Aug 20, 2009 at 10:01 AM, Michiel de Hoon <mjl...@ya...>wrote: > Whether or not you can do multiple show()s depends on which backend you > use. For example, the Mac OS X native backend has no problems with the > multiple show()s in your example. Which backend were you using? While > matplotlib does not support multiple show()s in general, there may be a > simple solution to get that working for the backend you are using. > > --Michiel. > > --- On Wed, 8/19/09, Kim, Dae-Won <dw...@gm...> wrote: > > > From: Kim, Dae-Won <dw...@gm...> > > Subject: Re: [Matplotlib-users] show() problem in Mac OS X 10.5.8 > > To: "Ryan May" <rm...@gm...> > > Cc: mat...@li... > > Date: Wednesday, August 19, 2009, 2:48 PM > > > > The one 'preliminary' solution I found is using > > an interactive mode + raw_input. > > Here is and example, > > > > ion() > > plot([1,2,3,4,5]) > > raw_input('Type Enter') > > clf() > > > > > > plot([1,2,3,4,5]) > > raw_input('Type_Enter') > > clf() > > plot([1,2,3,4,5]) > > show() > > > > With this approach, I can press the enter when I want to > > see next figure. > > > > > > > > Though It's not as convenient as 'multiple > > show()'.. > > > > > > On Wed, Aug 19, 2009 at 1:57 PM, > > Kim, Dae-Won <dw...@gm...> > > wrote: > > > > > > > > > > On Wed, Aug 19, 2009 at 1:02 PM, > > Ryan May <rm...@gm...> > > wrote: > > > > > > > > On Wed, Aug 19, 2009 at 11:55 > > AM, coati <dw...@gm...> > > wrote: > > > > > > > > > > > > > > > > I have a problem with show() command in my macbook > > machine (Leopard 10.5.8). > > > > For example, if I run the script shown below > > > > (let assume it is saved as 'test.py', and I run a > > command 'python test.py'), > > > > > > > > --------------------------------------- > > > > > > > > plot([1,2,3,4,5]) > > > > show() #first window > > > > plot([1,2,3,4,5]) > > > > show() #second window > > > > plot([1,2,3,4,5]) > > > > show() #third window > > > > > > > > --------------------------------------- > > > > > > > > Then the first window just pops up and I can see a > > beautiful straight line > > > > :) No problem so far. > > > > But, after I close the first window by clicking the close > > button of the > > > > window, > > > > other two window (second and third) just pops up and close > > themselves > > > > instantly > > > > even though I didn't click the close button... > > > > Also, the second and third plot is shown in the same > > window. > > > > > > > > I don't have such problem in my Ubuntu machine.. > > > > > > > > Does anybody know reasons? > > show() actually handles starting the GUI mainloop, so you > > really shouldn't be calling it more than once from a > > script. Quite frankly, it's more amazing that it works > > on your Ubuntu macine. :) If you're wanting 3 separate > > windows, try: > > > > > > > > > > > > > > plot([1,2,3,4,5]) > > figure() > > plot([1,2,3,4,5]) > > figure() > > plot([1,2,3,4,5]) > > show() > > > > Ryan > > > > -- > > Ryan May > > > > Graduate Research Assistant > > School of Meteorology > > University of Oklahoma > > > > > > > > > > > > Thanks Ryan, > > > > Hm.. it's a bit strange.. I just installed matplotlib > > at Ubuntu using the package manager :) > > And, another linux machines (red hat enterprise) can do > > this too. For the RHELs, I compiled matplotlib source code > > by myself. > > > > > > > > > > > > figure() works very well, but what I want to do is to check > > the plots one by one and thus > > I can exit the script at any time I want (because I usually > > have lots of figures to check and I don't want > > to pop up every of them at the same time..) > > > > > > > > > > > > Anyway, thank you very much! > > > > > > > > > > > > > > > > -----Inline Attachment Follows----- > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal > > Reports 2008 30-Day > > trial. Simplify your report design, integration and > > deployment - and focus on > > what you do best, core application coding. Discover what's > > new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > -----Inline Attachment Follows----- > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > |
From: Michiel de H. <mjl...@ya...> - 2009-08-20 14:05:25
|
Are you on Mac OS X 10.5 or are you on an earlier version? The error message you're seeing indicates that MAC_OS_X_VERSION_10_5 is defined, suggesting that you are on Mac OS X 10.5. But then it should be aware of CTFontRef ... Did you change anything in your Python setup? --Michiel. --- On Wed, 8/19/09, George Nurser <gn...@go...> wrote: > From: George Nurser <gn...@go...> > Subject: [Matplotlib-users] mac os backend not building > To: Mat...@li... > Date: Wednesday, August 19, 2009, 12:23 PM > Hi, > I updated matplotlib to svn r 7506, but it won't build. I > am having > problems with the mac os backend: > > 10.5.8, gcc 4.0.1: > python setup.py build install run from the > matplotlib/matplotlib > directory gives: > ..... > building 'matplotlib.backends._macosx' extension > gcc -arch ppc -arch i386 -isysroot > /Developer/SDKs/MacOSX10.4u.sdk > -fno-strict-aliasing -Wno-long-double -no-cpp-precomp > -mno-fused-madd > -fno-common -dynamic -DNDEBUG -g -O3 > -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I/usr/X11R6/include > -I/usr/X11/include -I. > -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include > -Isrc -Iagg24/include -I. > -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 > -c src/_macosx.m -o > build/temp.macosx-10.3-i386-2.5/src/_macosx.o > src/_macosx.m:1885: error: syntax error before > ‘setfont’ > src/_macosx.m:1885: error: syntax error before > ‘setfont’ > src/_macosx.m: In function ‘setfont’:src/_macosx.m: In > function ‘setfont’: > src/_macosx.m:1895: error: ‘CTFontRef’ undeclared > (first use in this function) > > Possibly some confusion about whether MAC_OS_X_VERSION_10_5 > is defined?? > > --George Nurser. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: othererik <oth...@gm...> - 2009-08-20 14:02:48
|
John, Thanks for the information. The solution worked so, I can now do a mouse over over lines from either axes and have a nice little tooltip, etc. I found that if I change the zorder of the axis right after attempting to "pick" on the mouse event, it fails, but it's fine for my needs to just toggle the "top" axes on mouse events when looking for a mouse hover. if self.ax.get_zorder() == 0.1: ax.set_zorder( 0 ) ax2.set_zorder( 0.1 ) else: ax2.set_zorder( 0 ) ax.set_zorder( 0.1 ) self.figure.pick( event ) This is perhaps a bit of hackery, but I've not seen any mouse over legends of the sorts built in. Thanks again, -Erik John Hunter-4 wrote: > > > I'm not sure why it worked before -- that surprises me. Only one axes > can receive the pick event currently, so if you have overlapping axes, > as you do with twinx, the one with the highest zorder will receive the > pick events. > > -- View this message in context: http://www.nabble.com/onpick-on-a-2-y-plot-%28-via-twinx%28%29-%29-seems-to-only-allow-picking-of-second-axes%27s-artists-tp25049128p25062402.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michiel de H. <mjl...@ya...> - 2009-08-20 14:02:06
|
Whether or not you can do multiple show()s depends on which backend you use. For example, the Mac OS X native backend has no problems with the multiple show()s in your example. Which backend were you using? While matplotlib does not support multiple show()s in general, there may be a simple solution to get that working for the backend you are using. --Michiel. --- On Wed, 8/19/09, Kim, Dae-Won <dw...@gm...> wrote: > From: Kim, Dae-Won <dw...@gm...> > Subject: Re: [Matplotlib-users] show() problem in Mac OS X 10.5.8 > To: "Ryan May" <rm...@gm...> > Cc: mat...@li... > Date: Wednesday, August 19, 2009, 2:48 PM > > The one 'preliminary' solution I found is using > an interactive mode + raw_input. > Here is and example, > > ion() > plot([1,2,3,4,5]) > raw_input('Type Enter') > clf() > > > plot([1,2,3,4,5]) > raw_input('Type_Enter') > clf() > plot([1,2,3,4,5]) > show() > > With this approach, I can press the enter when I want to > see next figure. > > > > Though It's not as convenient as 'multiple > show()'.. > > > On Wed, Aug 19, 2009 at 1:57 PM, > Kim, Dae-Won <dw...@gm...> > wrote: > > > > > On Wed, Aug 19, 2009 at 1:02 PM, > Ryan May <rm...@gm...> > wrote: > > > > On Wed, Aug 19, 2009 at 11:55 > AM, coati <dw...@gm...> > wrote: > > > > > > > > I have a problem with show() command in my macbook > machine (Leopard 10.5.8). > > For example, if I run the script shown below > > (let assume it is saved as 'test.py', and I run a > command 'python test.py'), > > > > --------------------------------------- > > > > plot([1,2,3,4,5]) > > show() #first window > > plot([1,2,3,4,5]) > > show() #second window > > plot([1,2,3,4,5]) > > show() #third window > > > > --------------------------------------- > > > > Then the first window just pops up and I can see a > beautiful straight line > > :) No problem so far. > > But, after I close the first window by clicking the close > button of the > > window, > > other two window (second and third) just pops up and close > themselves > > instantly > > even though I didn't click the close button... > > Also, the second and third plot is shown in the same > window. > > > > I don't have such problem in my Ubuntu machine.. > > > > Does anybody know reasons? > show() actually handles starting the GUI mainloop, so you > really shouldn't be calling it more than once from a > script. Quite frankly, it's more amazing that it works > on your Ubuntu macine. :) If you're wanting 3 separate > windows, try: > > > > > > > plot([1,2,3,4,5]) > figure() > plot([1,2,3,4,5]) > figure() > plot([1,2,3,4,5]) > show() > > Ryan > > -- > Ryan May > > Graduate Research Assistant > School of Meteorology > University of Oklahoma > > > > > > Thanks Ryan, > > Hm.. it's a bit strange.. I just installed matplotlib > at Ubuntu using the package manager :) > And, another linux machines (red hat enterprise) can do > this too. For the RHELs, I compiled matplotlib source code > by myself. > > > > > > figure() works very well, but what I want to do is to check > the plots one by one and thus > I can exit the script at any time I want (because I usually > have lots of figures to check and I don't want > to pop up every of them at the same time..) > > > > > > Anyway, thank you very much! > > > > > > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > -----Inline Attachment Follows----- > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: marc d. <mde...@ya...> - 2009-08-20 07:07:36
|
I think I needed to create an "axes". This seems to have solved my problem. a = f.add_subplot(111) map = Basemap(projection='ortho', lat_0=34.0, lon_0=-117.3, resolution='l', area_thresh=1000, ax=a) Marc Desmarais Long Beach, CA, 90814 --- On Wed, 8/19/09, marc desmarais <mde...@ya...> wrote: From: marc desmarais <mde...@ya...> Subject: embeding basemap in Tk To: mat...@li... Date: Wednesday, August 19, 2009, 9:33 PM How do I embed basemap in Tk? I tried following the matplotlib example. But the following does not work (the earth does not appear): import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from mpl_toolkits.basemap import Basemap import Tkinter as Tk root = Tk.Tk() root.wm_title("Embedding in TK") f = Figure()#figsize=(5,4), dpi=100) map = Basemap(projection='ortho', lat_0=34.0,lon_0=-117.3, resolution='l' area_thresh=1000.) map.drawcoastlines() map.drawcountries() map.fillcontinents(color='coral') map.drawmapboundary() canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) Tk.mainloop() thanks... Marc Desmarais Long Beach, CA, 90814 |
From: marc d. <mde...@ya...> - 2009-08-20 06:57:36
|
"The longitude and latitude lines can be labelled where they the map projection boundary" at http://matplotlib.sourceforge.net/basemap/doc/html/users/graticule.html Marc Desmarais Long Beach, CA, 90814 --- On Wed, 8/19/09, marc desmarais <mde...@ya...> wrote: From: marc desmarais <mde...@ya...> Subject: embeding basemap in Tk To: mat...@li... Date: Wednesday, August 19, 2009, 9:33 PM How do I embed basemap in Tk? I tried following the matplotlib example. But the following does not work (the earth does not appear): import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from mpl_toolkits.basemap import Basemap import Tkinter as Tk root = Tk.Tk() root.wm_title("Embedding in TK") f = Figure()#figsize=(5,4), dpi=100) map = Basemap(projection='ortho', lat_0=34.0,lon_0=-117.3, resolution='l' area_thresh=1000.) map.drawcoastlines() map.drawcountries() map.fillcontinents(color='coral') map.drawmapboundary() canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) Tk.mainloop() thanks... Marc Desmarais Long Beach, CA, 90814 |