SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

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

Showing results of 295

<< < 1 2 3 4 5 .. 12 > >> (Page 3 of 12)
From: Patrick M. <pat...@gm...> - 2009年02月25日 03:35:48
As I mentioned in a previous email last night, I have built an
installer for matplotlib (updated this afternoon) off the SVN trunk.
You are welcome to use it, however be aware that maplotlib does not
support Python 2.6 (and won't until after Numpy officially supports
Python 2.6) and there are some known issues - one of which is that I
can't get Tkinter to work properly when using plot.show(). As a work
around I strongly suggest installing WxPython and using that as the
default backend. If you do chose to use this installer please know
that it is unsupported and you are on your own if something breaks.
http://code.patricktmarsh.com/builds
-Patrick
On Tue, Feb 24, 2009 at 7:22 PM, Philip Bloom <pb...@cr...> wrote:
> What is the recommended way to install matplotlib for python 2.6?
>
> I have numpy installed currently on my python 2.6 distribution. Is there an
> existing binary installer for matplotlib? Is the best thing to do to try
> and compile from the current .98.5 source?
>
> Thanks for any help or advice, it is much appreciated.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
-- 
Patrick Marsh
Graduate Research Assistant
School of Meteorology
University of Oklahoma
http://www.patricktmarsh.com
From: Jae-Joon L. <lee...@gm...> - 2009年02月25日 03:20:08
Can't you simply use "text"?
text(0.5, 0.5, "s", va="center", ha="center")
Unfortunately, no TextCollection yet.
-JJ
On Tue, Feb 24, 2009 at 4:49 PM, Fred Mailhot
<fma...@co...> wrote:
> Hi,
>
> I've looked through the documentation, and see that it's possible to
> plot a variety of symbols, including some customization, but what I'd
> really like to do is use a text character as the point marker. The
> only way I can think of doing this right now is to annotate the point
> (with zero offset) with the text in question, and somehow hide the
> actual point itself (is that even possible?).
>
> Is there something easier/more obvious that I'm missing?
>
> Thanks!
> Fred.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Philip B. <pb...@cr...> - 2009年02月25日 03:14:54
What is the recommended way to install matplotlib for python 2.6?
I have numpy installed currently on my python 2.6 distribution. Is
there an existing binary installer for matplotlib? Is the best thing to
do to try and compile from the current .98.5 source?
Thanks for any help or advice, it is much appreciated.
From: Fred M. <fma...@co...> - 2009年02月24日 23:20:18
Hi,
I've looked through the documentation, and see that it's possible to
plot a variety of symbols, including some customization, but what I'd
really like to do is use a text character as the point marker. The
only way I can think of doing this right now is to annotate the point
(with zero offset) with the text in question, and somehow hide the
actual point itself (is that even possible?).
Is there something easier/more obvious that I'm missing?
Thanks!
Fred.
From: Michael D. <md...@st...> - 2009年02月24日 16:37:14
rlp_GMC wrote:
> When I try to save a fig to a file I get the error 
>
> TclError Couldn't Connect to display ":0.0" 
>
> I looked in the Maplotlib users manual (latest version pg 144-146) and
> tried the following with no luck. BTW why is the same module named
> differently Linux/Win ?
> 
I presume you have different versions installed on each OS. pyplot was 
added only recently.
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pylab as plt (linux ) or, import matplotlib.pyplot as
> plt (Windows)
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.plot([1,2,3])
> fig.savefig('test.png')
>
> Is Matplotlib trying to display a plot to the monitor? 
> 
If TkAgg is set as your backend, then, yes, it will try to open a window 
on the display. If you need to run on a remote headless server, for 
instance, you can use the Agg backend. I see that you are doing that 
(with the matplotlib.use('Agg')) line, so I'm surprised why any 
Tcl-related message would be displayed at all.
Can you provide the information described here:
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Ryan M. <rm...@gm...> - 2009年02月24日 16:32:02
On Mon, Feb 23, 2009 at 9:33 PM, lehe <tim...@ya...> wrote:
>
> Hi,
> I am now plot two figures, The second one won't generate until I close the
> first one but the second one just flash and disappear very quickly. How can
> I keep both figures open until I close them myself?
> Thanks
>
> Here is my code:
> import matplotlib.pyplot as plt
>
> ......
>
> plt.figure() # ROC
> plt.plot(FPRs,TPRs)
> plt.xlabel('FP rate')
> plt.ylabel('TP rate')
> plt.title('ROC')
> plt.grid(True)
> plt.show()
>
> plt.figure() # histograms of scores for ESE and for decoys
> (bins, n) = histOutline.histOutline(ESE_scores)
> plt.plot(bins, n/sum(n), 'r-')
> (bins, n) = histOutline.histOutline(decoy_scores)
> plt.plot(bins, n/sum(n), 'b-')
> plt.title('Histogram of Scores')
> plt.legend(('ESE','decoy'))
> plt.show()
>
Delete your first call to show(). You only should call show() once, *after*
you generate all of your figures.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
From: Alan G I. <ala...@gm...> - 2009年02月24日 13:51:42
On 2/24/2009 3:44 AM Paul Anton Letnes apparently wrote:
> Is it possible to completely eliminate the 
> windows popping up? Though not very important, it is still annoying 
> that windows pop up when running a script in the background.
Sounds like you are calling `show`.
Don't.
Cheers,
Alan Isaac
From: david.froger <dav...@gm...> - 2009年02月24日 13:46:04
Hi, I have the same problem, I have joined examples.
http://www.nabble.com/file/p22180990/example.py example.py 
http://www.nabble.com/file/p22180990/example.pdf example.pdf 
http://www.nabble.com/file/p22180990/example.pdf example.pdf 
Zack 24 wrote:
> 
> Hi Richard, what exactly wrong here?
> I didn't found anything...
> 
> On 4 May 2007, Richard Vernhes wrote:
>> Here is attached the eps file with misaligned labels and grid.
>> Richard
> 
> 
> 
> -- 
> Zack
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Problem-with-the-position-of-tick-labels-in-postscript-file-tp10324639p22180990.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Zunbeltz I. <zun...@gm...> - 2009年02月24日 13:01:19
Dear all,
If I am not wrong it is not possible to set the rotation and alignament 
options of xlabel and ylabel in the rcParam. I think this would be a 
nice idea. If there is nobody working on that I can have a look. Could
you please outline what classes/method should I look in the matplotlib
source code?
Regards
Zunbelz
-- 
Dr. Zunbeltz Izaola
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin
Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 
-- 
Dr. Zunbeltz Izaola
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin
Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 
From: Paul R. <pau...@ro...> - 2009年02月24日 09:49:48
Hi Dante,
 If I've understood you correctly, then you need to add one line:
# Set the limits of the x-axis, overriding default.
plt.xlim(0, 4)
Hope this helps, 
Paul
-- 
View this message in context: http://www.nabble.com/Very-simple-question%2C-but-I-can%27t-still-find-a-solution.-tp22152593p22179003.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Paul A. L. <pau...@gm...> - 2009年02月24日 08:44:50
On 24. feb.. 2009, at 08.11, Eric Firing wrote:
> Paul Anton Letnes wrote:
>> Hello,
>> I want to save a large number of figures to file, roughly like this:
>> import pylab
>> for i in xrange(100):
>> pylab.plot(x[i], y[i])
>> pylab.savefig('plot' + str(i) + '.eps')
>> pylab.figure()
>> However, a large number of figure windows show up on screen, and 
>> eventually, the application runs out of memory and crashes. How do 
>> I avoid these windows?
>
> Replace the pylab.figure() command with pylab.clf(), or with 
> pylab.close().
>
> Eric
>
>> Regards,
>> Paul.
Thanks, this helps a lot. Is it possible to completely eliminate the 
windows popping up? Though not very important, it is still annoying 
that windows pop up when running a script in the background.
Paul.
From: Johann R. <jr...@su...> - 2009年02月24日 07:18:48
Hi JJ
On Monday, 23 February 2009, Jae-Joon Lee wrote:
> Here is my modification.
>
> Bbox = matplotlib.transforms.Bbox.from_bounds(.4, .1, .5, .3)
> trans = ax.transAxes + fig.transFigure.inverted()
> l, b, w, h = matplotlib.transforms.TransformedBbox(Bbox,
> trans).bounds 
> axins = fig.add_axes([l, b, w, h]) 
Thanks for this - works like a charm. My experience with 
transformations is very limited but I can see that they are very 
powerful...
> > 3. Re-calculating [l, b, w, h] from tBbox seems cumbersome. Can
> > the add_axes() not call a Bbox instance directly?
>
> Also see my modification.
> I'm sorry but I don't understand what you mean by "add_axes() not
> call a Bbox instance directly?".
This has been answered by your modification - I wasn't aware of 
the .bounds attribute of a bounding box, which gives the required 
input to add_axes().
Thanks again
Johann
From: Eric F. <ef...@ha...> - 2009年02月24日 07:12:07
Paul Anton Letnes wrote:
> Hello,
> 
> I want to save a large number of figures to file, roughly like this:
> 
> import pylab
> for i in xrange(100):
> pylab.plot(x[i], y[i])
> pylab.savefig('plot' + str(i) + '.eps')
> pylab.figure()
> 
> However, a large number of figure windows show up on screen, and 
> eventually, the application runs out of memory and crashes. How do I 
> avoid these windows?
Replace the pylab.figure() command with pylab.clf(), or with pylab.close().
Eric
> 
> Regards,
> Paul.
> 
From: Paul A. L. <pau...@gm...> - 2009年02月24日 07:03:17
Hello,
I want to save a large number of figures to file, roughly like this:
import pylab
for i in xrange(100):
 pylab.plot(x[i], y[i])
 pylab.savefig('plot' + str(i) + '.eps')
 pylab.figure()
However, a large number of figure windows show up on screen, and 
eventually, the application runs out of memory and crashes. How do I 
avoid these windows?
Regards,
Paul.
From: rlp_GMC <rp...@re...> - 2009年02月24日 05:35:39
When I try to save a fig to a file I get the error 
TclError Couldn't Connect to display ":0.0" 
I looked in the Maplotlib users manual (latest version pg 144-146) and
tried the following with no luck. BTW why is the same module named
differently Linux/Win ?
import matplotlib
matplotlib.use('Agg')
import matplotlib.pylab as plt (linux ) or, import matplotlib.pyplot as
plt (Windows)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1,2,3])
fig.savefig('test.png')
Is Matplotlib trying to display a plot to the monitor? 
rlp
-- 
View this message in context: http://www.nabble.com/TclError-Couldn%27t-Connect-to-display-%22%3A0.0%22-tp22176192p22176192.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: rlp_GMC <rp...@re...> - 2009年02月24日 05:22:07
-- 
View this message in context: http://www.nabble.com/TclError-Couldn%27t-Connect-to-display-%22%3A0.0%22-tp22176082p22176082.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Patrick M. <pat...@gm...> - 2009年02月24日 03:34:44
I have built matplotlib (and numpy since it is required for
matplotlib) with python2.6. Please note that these are UNSUPPORTED
and you use them at your own risk. They were built from the 9
February 2009 SVN so use at your own risk. You will have to install
numpy first and matplotlib second. I would also recommend installing
WxPython before installing matplotlib since there are some bugs using
Tkinter with matplotlib on python2.6. I've been too busy to try and
track it down.
http://code.patricktmarsh.com/builds/
-Patrick
On Sun, Feb 22, 2009 at 4:59 PM, Wai Yip Tung <tun...@ya...> wrote:
> Hello all,
>
> I find that Matplotlib only have Python 2.5 build for Windows. Is there
> any plan to release a 2.6 build soon? I am trying to build it from source
> but I run into numerous problem. I am still struggling to find all
> dependent packages. It will help a lot if the 2.6 installer is available.
>
> Thanks,
>
> Wai Yip
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Patrick Marsh
Graduate Research Assistant
School of Meteorology
University of Oklahoma
http://www.patricktmarsh.com
From: lehe <tim...@ya...> - 2009年02月24日 03:33:25
Hi,
I am now plot two figures, The second one won't generate until I close the
first one but the second one just flash and disappear very quickly. How can
I keep both figures open until I close them myself?
Thanks
Here is my code:
 import matplotlib.pyplot as plt
 ......
 plt.figure() # ROC
 plt.plot(FPRs,TPRs)
 plt.xlabel('FP rate')
 plt.ylabel('TP rate')
 plt.title('ROC')
 plt.grid(True)
 plt.show()
 plt.figure() # histograms of scores for ESE and for decoys
 (bins, n) = histOutline.histOutline(ESE_scores)
 plt.plot(bins, n/sum(n), 'r-') 
 (bins, n) = histOutline.histOutline(decoy_scores)
 plt.plot(bins, n/sum(n), 'b-') 
 plt.title('Histogram of Scores')
 plt.legend(('ESE','decoy'))
 plt.show()
-- 
View this message in context: http://www.nabble.com/How-to-keep-figure-instead-of-flashing-tp22175200p22175200.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Adam M. <ram...@gm...> - 2009年02月24日 03:20:23
On Sun, Feb 22, 2009 at 16:59, Wai Yip Tung <tun...@ya...> wrote:
> I find that Matplotlib only have Python 2.5 build for Windows. Is there
> any plan to release a 2.6 build soon? I am trying to build it from source
> but I run into numerous problem. I am still struggling to find all
> dependent packages. It will help a lot if the 2.6 installer is available.
AFAIK matplolib doesn't support python-2.6 yet, as NumPy doesn't.
NumPy is expected to get python-2.6 support in the 1.3 release, so I
imagine matplotlib will support python-2.6 in a release following the
NumPy-1.3 release.
Cheers
Adam
From: Eric F. <ef...@ha...> - 2009年02月23日 23:45:10
Jeff Whitaker wrote:
> Andres Luhamaa wrote:
>> Jeff Whitaker wrote:
>> 
>>> Andres Luhamaa wrote:
>>> 
>>> 
>>>> Hello!
>>>> When trying to make a simple map of Europe with countries drawn, one can 
>>>> see that coastlines and country borders are not consistent.
>>>> Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish 
>>>> somewhere in the sea, to name just a few. Is this a known issue and is 
>>>> there a solution (coming at least)?
>>>>
>>>> Simple script, little zooming will help to see better.
>>>>
>>>> Best regards,
>>>> Andres
>>>>
>>>> Simple script:
>>>> #!/usr/bin/env python
>>>> import numpy as np
>>>> from mpl_toolkits.basemap import Basemap
>>>> import matplotlib.pyplot as plt
>>>> m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
>>>> projection='lcc',lat_0=60,lon_0=0.,
>>>> resolution ='i',area_thresh=1000.)
>>>> fig=plt.Figure()
>>>> m.drawcoastlines()
>>>> m.drawcountries()
>>>> plt.show()
>>>>
>>>> 
>>>> 
>>>> 
>>> Andres: We get the country boundary database from Generic Mapping 
>>> Tools, so unless they fix it, we won't have a fix. If you can suggest a 
>>> better database that does not have this problem, I can try to 
>>> incorporate it.
>>>
>>> I guess it is possible is also possible that this is intentional - and 
>>> the border does extend into the sea.
>>>
>>> -Jeff
>>> 
>>> 
>> Thank You for the answer. It really might be intentional, because the 
>> border in sea never seems to be straight when it is drawn and actually 
>> now looking the same borders in google maps, there is a strong 
>> similarity. But I still think there might be an option to not draw the 
>> borders on the sea, mask them out somehow. Would it be complicated to 
>> add such an option or am I the only one disturbed by such an appearance?
>>
>> Andres
>> 
> 
> Andres: It might be possible, but it certainly wouldn't be trivial. 
> You would have to compute the intersection of the country boundaries 
> with the coastline polygons and then clip. 
Jeff, Andres,
As a workaround, maybe one could use a suitable combination of opaque 
ocean patches, and setting the zorders of the ocean patches and the 
country boundaries so that the latter are lower then the former.
Eric
> 
> -Jeff
>>> ------------------------------------------------------------------------------
>>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
>>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
>>> -Strategies to boost innovation and cut costs with open source participation
>>> -Receive a 600ドル discount off the registration fee with the source code: SFAD
>>> http://p.sf.net/sfu/XcvMzF8H
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>> 
>>> 
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
>> -Strategies to boost innovation and cut costs with open source participation
>> -Receive a 600ドル discount off the registration fee with the source code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
> 
> 
From: Jeff W. <js...@fa...> - 2009年02月23日 23:27:11
Andres Luhamaa wrote:
> Jeff Whitaker wrote:
> 
>> Andres Luhamaa wrote:
>> 
>> 
>>> Hello!
>>> When trying to make a simple map of Europe with countries drawn, one can 
>>> see that coastlines and country borders are not consistent.
>>> Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish 
>>> somewhere in the sea, to name just a few. Is this a known issue and is 
>>> there a solution (coming at least)?
>>>
>>> Simple script, little zooming will help to see better.
>>>
>>> Best regards,
>>> Andres
>>>
>>> Simple script:
>>> #!/usr/bin/env python
>>> import numpy as np
>>> from mpl_toolkits.basemap import Basemap
>>> import matplotlib.pyplot as plt
>>> m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
>>> projection='lcc',lat_0=60,lon_0=0.,
>>> resolution ='i',area_thresh=1000.)
>>> fig=plt.Figure()
>>> m.drawcoastlines()
>>> m.drawcountries()
>>> plt.show()
>>>
>>> 
>>> 
>>> 
>> Andres: We get the country boundary database from Generic Mapping 
>> Tools, so unless they fix it, we won't have a fix. If you can suggest a 
>> better database that does not have this problem, I can try to 
>> incorporate it.
>>
>> I guess it is possible is also possible that this is intentional - and 
>> the border does extend into the sea.
>>
>> -Jeff
>> 
>> 
>
> Thank You for the answer. It really might be intentional, because the 
> border in sea never seems to be straight when it is drawn and actually 
> now looking the same borders in google maps, there is a strong 
> similarity. But I still think there might be an option to not draw the 
> borders on the sea, mask them out somehow. Would it be complicated to 
> add such an option or am I the only one disturbed by such an appearance?
>
> Andres
> 
Andres: It might be possible, but it certainly wouldn't be trivial. 
You would have to compute the intersection of the country boundaries 
with the coastline polygons and then clip. 
-Jeff
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
>> -Strategies to boost innovation and cut costs with open source participation
>> -Receive a 600ドル discount off the registration fee with the source code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> 
>> 
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Delbert F. <dd...@iq...> - 2009年02月23日 21:05:57
On Monday 23 February 2009, Gregor Skrt wrote:
> 1. Where can I find a good tutorial or set of examples for
> embeding matplotlib in Tkinter ?
> 2. Problem: I created a simple test with Tkinter. First I plot my
> graph on __init__ (it works ok). Then I want to clear graph and
> plot on the same canvas with different parameters. The thing is
> that plot shows up only when I resize my window. Any idea what
> could I be doing wrong ? I was trying draw method but it doasn't
> work...
> 
> 
> Here is my code:
> 
> Thanks for your help. Gregor Skrt
> 
> 
> 
> 
Here are a few links for item #1 in your list. I'm not yet skilled enough 
to quickly answer #2. In summary, information about Tkinter is scattered
about in various places:)--at least my take on it.
Here are two links to get you started:
http://www.astro.washington.edu/users/rowen/TkinterSummary.html
This page has quite a few links to resources on Tkinter:
http://wiki.python.org/moin/TkInter
There is a complete book on the subject by Grayson, that is
from 2000. All the examples were online the last time I checked (
some years ago). Also there are used book copies for about 60ドル US that 
can be found from the wiki.python.org link. 
I am planning to get back into Tkinter soon. I have developed a 
time-series plotting package but have not touched it in almost two
years:( Thus I have to re-learn a few things because I wasn't an 
expert when I had to move to other things--things that earned me 
billable hours!
One final observation: I find GUI programming to be a challenge but a lot
of fun. However, it takes time, at least for me, to work out many of the
details. However, matplotlib is an excellent tool to put at the heart of
anything used to plot technical data. Almost all of my software development
from 1963 on has been in Fortran. Still working on getting my "mind wrapped"
around object-oriented software and Python:) Python is my platform of choice
for any GUI development that I do. I find it a fantastic language!!
Hope this helps your. 
 Delbert
From: Jae-Joon L. <lee...@gm...> - 2009年02月23日 20:34:54
On Mon, Feb 23, 2009 at 3:06 PM, Johann Rohwer <jr...@su...> wrote:
> Is there any way of conveniently changing the font size of tick labels using
> the object-oriented interface?
>
> I'm aware of plt.xticks(fontsize=6), which does this globally for a figure,
> but if I have a number of custom axes of which I only want to change the
> tick-fontsize of a selected few, I've only been able to come up with
> ax1.xaxis.set_ticklabels([0,1,2,3,4,5], fontsize=6)
> This involves manually specifying the tick labels. However, I'm perfectly
> happy with the labels as supplied by ScalarFormatter and only want to change
> the font size. How to do this?
>
 for t in ax1.get_xticklabels():
 t.set_fontsize(6.)
Or with matplotlib.artist.setp function,
 setp(ax1.get_xticklabels(), fontsize=6)
-JJ
> Regards
> Johann
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jae-Joon L. <lee...@gm...> - 2009年02月23日 20:27:58
Here is my modification.
 Bbox = matplotlib.transforms.Bbox.from_bounds(.4, .1, .5, .3)
 trans = ax.transAxes + fig.transFigure.inverted()
 l, b, w, h = matplotlib.transforms.TransformedBbox(Bbox, trans).bounds
 axins = fig.add_axes([l, b, w, h])
On Mon, Feb 23, 2009 at 2:49 PM, Johann Rohwer <jr...@su...> wrote:
> Johann Rohwer wrote:
>
> To answer my own question, after browsing the docstrings I came up with the
> following attached minimal script to illustrate a solution to the problem.
> However, it appears crufty. Specifically,
>
> 1. Can the fig.add_axes() call not take a transform directly as optional
> argument, like in fig.add_axes([.4, .1, .5, .3], transform=ax.transAxes)?
> This would appear the natural solution but does not work.
>
The axes position should be given in the normalized figure coordinates.
> 2. The transformed bounding box gives coordinates in points, necessitating
> the division by figure width and figure height to revert back to fractional
> coordinates.
With my modification, you don't need this anymore.
>
> 3. Re-calculating [l, b, w, h] from tBbox seems cumbersome. Can the
> add_axes() not call a Bbox instance directly?
Also see my modification.
I'm sorry but I don't understand what you mean by "add_axes() not call
a Bbox instance directly?".
IHTH,
-JJ
>
> I'm sure I'm missing something obvious but don't have the time to delve into
> the transforms sourcecode, so any pointer is appreciated :-)
>
> Johann
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Johann R. <jr...@su...> - 2009年02月23日 20:06:41
Is there any way of conveniently changing the font size of tick labels using 
the object-oriented interface?
I'm aware of plt.xticks(fontsize=6), which does this globally for a figure, 
but if I have a number of custom axes of which I only want to change the 
tick-fontsize of a selected few, I've only been able to come up with
	 ax1.xaxis.set_ticklabels([0,1,2,3,4,5], fontsize=6)
This involves manually specifying the tick labels. However, I'm perfectly 
happy with the labels as supplied by ScalarFormatter and only want to change 
the font size. How to do this?
Regards
Johann
6 messages has been excluded from this view by a project administrator.

Showing results of 295

<< < 1 2 3 4 5 .. 12 > >> (Page 3 of 12)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /