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
(47)
2
(13)
3
(12)
4
(16)
5
(3)
6
(6)
7
(20)
8
(45)
9
(24)
10
(30)
11
(14)
12
(4)
13
(1)
14
(6)
15
(6)
16
(10)
17
(15)
18
(13)
19
(4)
20
21
(14)
22
(13)
23
(9)
24
(19)
25
(24)
26
27
(4)
28
(20)
29
(17)
30
(7)



Showing results of 397

<< < 1 .. 8 9 10 11 12 .. 16 > >> (Page 10 of 16)
From: Jae-Joon L. <lee...@gm...> - 2010年06月09日 18:29:19
What version of matplotlib are you using?
With 0.99.1.1 (and likely later) and also with the svn version, using
the bbox_inches="tight" actually produces an output with too small
margin.
With the svn version, following code should generate an output with an
adequate margin.
Otherwise, you cannot rely on bbox_inches features. Instead, you have
to manually adjust the size of the figure (and subplots_adjust).
Regards,
-JJ
 t1=ax.text(0.5, -0.15, 'Longitude', transform=ax.transAxes,
ha='center', va='center')
 t2=ax.text(-0.1, 0.5, 'Latitude', transform=ax.transAxes, ha=
'center', va='center', rotation='vertical')
 #ax.set_title("Sign.Different: GSPW2 - Princeton")
 fig.savefig('test.png', dpi=300, bbox_inches='tight',
bbox_extra_artists=[t1, t2])
On Tue, Jun 8, 2010 at 7:47 PM, mdekauwe <mde...@gm...> wrote:
>
> Hi,
>
> when I make plots with the Basemap package I seem to be getting a large
> amount of white space at the top and bottom of the plot, even if I use the
> option bbox_inches='tight'. Does anyone know how I can stop this happening?
>
> Example image...
> http://old.nabble.com/file/p28824528/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpg
>
> What I am currently doing...
>
> def makeMap(image, ofname, imageMin, imageMax, ticks):
>  """ dump out the array as a nice map... """
>  fig = plt.figure(figsize=(8, 6))
>  m = Basemap(projection='cyl', llcrnrlon=-179.5, llcrnrlat=-60.0, \
>            urcrnrlon=179.5, urcrnrlat=89.5, resolution='c')
>  # add an axes, leaving room for colorbar on the right.
>  ax = fig.add_axes([0.1, 0.1, 0.7, 0.7])
>  m.ax = ax
>  colourmap = plt.cm.RdYlBu
>  colourmap.set_bad('w', 1.0)
>  im = m.imshow(image, colourmap, colors.Normalize(vmin=imageMin,
> vmax=imageMax, clip=False),\
>              interpolation='nearest')
>  pos = ax.get_position()
>  l, b, w, h = pos.bounds
>  cax = plt.axes([l + w + 0.045, b, 0.05, h])
>  norm = colors.BoundaryNorm(ticks, colourmap.N)
>  cbar = mpl.colorbar.ColorbarBase(cax, cmap=colourmap, norm=norm,
> ticks=ticks)
>  #cbar = plt.colorbar(im, cax=cax)
>  # xlabel and ylabel were overwriting the tick labels so i need to move
> them
>  # transAxes set the position from the bottom left of the axes (1,1 would
> be the top right)
>  ax.text(0.5, -0.15, 'Longitude', transform=ax.transAxes, ha='center',
> va='center')
>  ax.text(-0.1, 0.5, 'Latitude', transform=ax.transAxes, ha= 'center',
> va='center', rotation='vertical')
>  #ax.set_title("Sign.Different: GSPW2 - Princeton")
>  m.drawcoastlines(linewidth=0.2, color='k')
>  m.drawcountries(linewidth=0.1, color='k')
>  #m.drawrivers()
>  m.drawparallels(np.array([-90.0, -60.0, -30.0, 0.0, 30.0, 60.0, 90.0]),
> labels=[1,0,0,1],\
>              fontsize=10, rotation=20)
>  m.drawmeridians(np.array([-180.0, -120.0, -60.0, 0.0, 60.0, 120.0,
> 180.0]), labels=[0,0,0,1], \
>              fontsize=10, rotation=20)
>  fig.savefig(ofname + '.png', dpi=300, bbox_inches='tight')
>  # for LaTeX doc...
>  fig.savefig(os.path.join("/users/eow/mgdk/doc/snowy_notes/figures/",
> (ofname + ".eps")), dpi=300,\
>          bbox_inches='tight')
>
> Many thanks,
>
> Martin
> --
> View this message in context: http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28824528.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Waléria A. D. <wal...@gm...> - 2010年06月09日 18:26:05
On 6/9/2010 9:12 AM, Wal?ria Antunes David wrote:
> Is there a way to plot my functions in the graph so that one can to
> visualize the difference between them.
Did you try the example I posted?
Why is it not adequate?
Alan Isaac
Hello,
Alan Isaac,
Sure, i tried your example, but really i don't was understanding with my
graph, what was happening to my graph. So, i talked with my boss and he
explained that was problem of scale.
I think i resolved my problem, if i get lost i write again for you.....ok?
Now, i using your example, is adequate for me.
thank you very much
and sorry, i'm brazilian and i'm studying english and it is not very
good......
On Wed, Jun 9, 2010 at 10:12 AM, Waléria Antunes David <
wal...@gm...> wrote:
> Hello...
>
> Benjamin,
>
> I made a correction in my functions, i added parentheses for the
> denominator in the functions, saw the images in the attached:
>
> two_functions.jpg
> result in graph = images_.png
> output values = values of the first function and values of the second
> function
>
> Is there a way to plot my functions in the graph so that one can to
> visualize the difference between them.
>
> This is correct my functions?
>
>
>
> On Tue, Jun 8, 2010 at 4:35 PM, Benjamin Root <ben...@ou...> wrote:
>
>> Waléria,
>>
>> I repeat, you need to add parentheses for the denominator of that quantity
>> in order to match what you wrote out on paper. You are missing a set of
>> parentheses that is causing (3e14**2) to be *multiplied* rather than
>> divided. This explains the huge values you are getting.
>>
>> Ben Root
>>
>>
>> On Tue, Jun 8, 2010 at 2:05 PM, Waléria Antunes David <
>> wal...@gm...> wrote:
>>
>>> no, I think, did not understand my functions.....see....i made a change
>>> my second function in the attached.
>>>
>>>
>>> On Tue, Jun 8, 2010 at 3:48 PM, Benjamin Root <ben...@ou...> wrote:
>>>
>>>> I think I found your errors.
>>>>
>>>> First, you are correct, the scientific notation in python is as you
>>>> understand, there is nothing wrong with that.
>>>>
>>>> Instead, you have a problem with order of operations. In the last
>>>> quantity, you have "((x**2)/4*(1e4**2)*(3e14**2))"
>>>> According to the equation that you wrote out in the attached image, you
>>>> need: "((x**2)/*(*4*(*2*e4**2)*(3e14**2))*)*"
>>>> Note that you needed parentheses for the entire denominator. Also, the
>>>> 1e4**2 should have been 2e4**2.
>>>>
>>>> This gives me values between 4.3125e-48 and 5.5359e-48.
>>>>
>>>> Ben Root
>>>>
>>>> On Tue, Jun 8, 2010 at 12:47 PM, Waléria Antunes David <
>>>> wal...@gm...> wrote:
>>>>
>>>>> I understand what you are saying, but my functions are these, attached.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Scientific notation in Python is not so?
>>>>>
>>>>> *Math * *Python*
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Pinc = 10-6 Pinc = 1e-6
>>>>>
>>>>> 3,0x1014 3e14
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ?
>>>>>
>>>>>
>>>>> Then, changing my functions of the images attached for python is as bellow:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> y1 = -108*(x**2)/(3e14**2)
>>>>>
>>>>> y2 = 1*((1.38e-23*(1e0+4)/1e-6)*((x**2)/4*(1e4**2)*(3e14**2))))
>>>>>
>>>>> Is not it?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jun 8, 2010 at 1:34 PM, Gökhan Sever <gok...@gm...>wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 8, 2010 at 10:19 AM, Waléria Antunes David <
>>>>>> wal...@gm...> wrote:
>>>>>>
>>>>>>> Hello!!!
>>>>>>>
>>>>>>> My name is Waleria. I work at INPE in Sao Jose dos Campos, Brazil.
>>>>>>> And I'd like to make a question. I'm in trouble to generate a two functions
>>>>>>> graph.
>>>>>>>
>>>>>>> I have a problem to generate a graph of the two functions. I have
>>>>>>> this functions, is bellow:
>>>>>>>
>>>>>>> *y1 = -108*(x**2)/(3e14**2)*
>>>>>>>
>>>>>>> *y2 = 1*((1.38e-23*(1e0+4)/1e-6)*((x**2)/4*(1e4**2)*(3e14**2))))*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> You might need to check your y2. You are mixing integers and floats
>>>>>> which possible have resulted with some rounding errors. I get e+30 when I
>>>>>> assert the terms as floats in y2.
>>>>>>
>>>>>> For the plotting: y1 is around -e-20 whereas y2 goes up to e+30. You
>>>>>> can't see the trend easily on one axes even if you could scale
>>>>>> them logarithmically (hint logarithm is only defined for positive numbers).
>>>>>> You can make a positive assumption for the y1 and plot them on one y-axes
>>>>>>
>>>>>> yscale('log')
>>>>>> axis(ymin=1e+20, ymax=1e+30)
>>>>>>
>>>>>> Still this won't let you see the functions trends that you are looking
>>>>>> to see. I would suggest you to use multipe figures or investing a bit more
>>>>>> time to use parasite axes example of JJ.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Gökhan
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>>>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>>>> lucky parental unit. See the prize list and enter to win:
>>>>> http://p.sf.net/sfu/thinkgeek-promo
>>>>> _______________________________________________
>>>>> Matplotlib-users mailing list
>>>>> Mat...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>>
>>>>>
>>>>
>>>
>>
>
From: Robert S. <rob...@gm...> - 2010年06月09日 18:06:22
Thanks to both of you for your replies.
I should have included the info that I've tried to build matplotlib using
virtualenv with the --no-site-packages option.
... And in the meantime, I have an existing (and working) build, courtesy of
the Ubuntu package manager.
Seeing as the package manager version is working, I'm going to scrub
everything that I currently have (including any build directories which have
been created along the way) and start from scratch... I'll let you know if
that works!!
Thanks again,
Rob
On 9 June 2010 18:26, Benjamin Root <ben...@ou...> wrote:
> I don't know if this is the same issue that I had once, but I will just
> throw it out there. Once I compiled matplotlib myself before
> double-checking that I had all the needed development files and so the build
> process didn't produce all the files for tkagg and used GTKAgg instead. I
> had to get all the needed development packages and completely clean out my
> build directory and rebuild matplotlib before it would work properly.
>
> Ben Root
>
> On Wed, Jun 9, 2010 at 9:47 AM, Robert Sudwarts <rob...@gm...
> > wrote:
>
>> Hi,
>>
>> I've installed matplotlib in a virtual environment but am having a problem
>> with generating a plot.
>> I've tried to run a "simple_plot.py" both as a script and from within the
>> ipython/python shell.
>>
>> I've changed the backend in
>> virtualenvs/.../lib/python2.6/site-packages/matplotlig/mpl-data/matplotlibrc
>> to: "backend : TkAgg"
>>
>> from the within the virtualenv (regular python) shell I can:
>> >>> import _tkinter
>> >>> import Tkinter
>> >>> Tkinter._test()
>> (and the test window opens as expected)
>>
>> My virtualenv sys.path includes:
>> "/home/virtualenvs/.../lib/python2.6/lib-tk'
>>
>> When I try to use ipython -pylab (or run a script) I'm getting an error:
>>
>> .... import _tkagg
>> ImportError: No module named _tkagg
>>
>> I'm assuming that there's a relatively simple fix for this related to the
>> "matplotlibrc" backend but can't for the life of me work out how to get it
>> fixed. I'd be grateful for any help.
>>
>> Many thanks,
>> Rob
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit. See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
On 06/08/2010 11:07 PM, Matthias Michler wrote:
> On Wednesday, June 09, 2010 11:00:31 am Eric Firing wrote:
>> On 06/08/2010 10:48 PM, Matthias Michler wrote:
>>> On Friday, April 23, 2010 11:08:50 am Matthias Michler wrote:
>>>> Hello list, Hello developers,
>>>>
>>>> I'd like to summarize my discussion with Gökhan ("Turning off minor
>>>> grids on log scaled plot") in the last days and propose two patches.
>>>>
>>>> The first patch adds the keyword argument 'which' from the axis.grid to
>>>> the method 'grid' of the Axes
>>>> (axes_grid_for_major_and_minor_ticks.patch). This allows to change the
>>>> drawing of grid lines for x- and y-axis at the same time.
>>>>
>>>> Furthemore Gökhan proposed to toggle *all* (namely major and minor tick)
>>>> grid lines after pressing the key 'g'. Therefore the call
>>>> event.inaxes.grid(), which toggles only the (default) major tick grid
>>>> lines, is replaced by event.inaxes.grid(which='majorminor') (see
>>>> toggling_all_tick_grid_lines.patch).
>>>> This yields the expected behavior if e.g. all (major and minor) tick
>>>> grid lines are shown, because than toggling the grid means to remove
>>>> all grid lines. But to be honest I'm not sure the latter is the
>>>> intended behavior in all cases. For instance in the case of shown major
>>>> tick lines toggling all means turning off major tick lines and turning
>>>> on minor tick lines by pressing 'g'. This sounds a little bit crazy to
>>>> me, although that's what toggling is about.
>>
>> I think that behavior would indeed drive the user crazy, so I would not
>> want to commit a patch that does that.
>>
>> Eric
>
> Hi Eric,
>
> thanks a lot for your comment. What do you think about the first part namely
> adding the kwarg 'which' from the axis method to the Axes method grid?
I went ahead and did it in 8402--check to see that this is what you had 
in mind. The which kwarg can be 'both', 'minor', or 'major'.
Eric
>
> Kind regards,
> Matthias
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Benjamin R. <ben...@ou...> - 2010年06月09日 17:27:12
I don't know if this is the same issue that I had once, but I will just
throw it out there. Once I compiled matplotlib myself before
double-checking that I had all the needed development files and so the build
process didn't produce all the files for tkagg and used GTKAgg instead. I
had to get all the needed development packages and completely clean out my
build directory and rebuild matplotlib before it would work properly.
Ben Root
On Wed, Jun 9, 2010 at 9:47 AM, Robert Sudwarts
<rob...@gm...>wrote:
> Hi,
>
> I've installed matplotlib in a virtual environment but am having a problem
> with generating a plot.
> I've tried to run a "simple_plot.py" both as a script and from within the
> ipython/python shell.
>
> I've changed the backend in
> virtualenvs/.../lib/python2.6/site-packages/matplotlig/mpl-data/matplotlibrc
> to: "backend : TkAgg"
>
> from the within the virtualenv (regular python) shell I can:
> >>> import _tkinter
> >>> import Tkinter
> >>> Tkinter._test()
> (and the test window opens as expected)
>
> My virtualenv sys.path includes:
> "/home/virtualenvs/.../lib/python2.6/lib-tk'
>
> When I try to use ipython -pylab (or run a script) I'm getting an error:
>
> .... import _tkagg
> ImportError: No module named _tkagg
>
> I'm assuming that there's a relatively simple fix for this related to the
> "matplotlibrc" backend but can't for the life of me work out how to get it
> fixed. I'd be grateful for any help.
>
> Many thanks,
> Rob
>
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Michael D. <md...@st...> - 2010年06月09日 17:20:28
On 06/09/2010 10:47 AM, Robert Sudwarts wrote:
> Hi,
>
> I've installed matplotlib in a virtual environment but am having a 
> problem with generating a plot.
> I've tried to run a "simple_plot.py" both as a script and from within 
> the ipython/python shell.
>
> I've changed the backend in 
> virtualenvs/.../lib/python2.6/site-packages/matplotlig/mpl-data/matplotlibrc
> to: "backend : TkAgg"
>
> from the within the virtualenv (regular python) shell I can:
> >>> import _tkinter
> >>> import Tkinter
> >>> Tkinter._test()
> (and the test window opens as expected)
>
> My virtualenv sys.path includes: 
> "/home/virtualenvs/.../lib/python2.6/lib-tk'
>
> When I try to use ipython -pylab (or run a script) I'm getting an error:
>
> .... import _tkagg
> ImportError: No module named _tkagg
>
> I'm assuming that there's a relatively simple fix for this related to 
> the "matplotlibrc" backend but can't for the life of me work out how 
> to get it fixed. I'd be grateful for any help.
>
The tkagg backend requires a compiled C extension (_tkagg) built when 
matplotlib is built. If Tkinter was not available at the time 
matplotlib was built, then that extension may not exist. If you can 
provide the output of a clean matplotlib build (i.e. remove the build 
directory first) that would be the best way to diagnose that problem.
Alternatively, you can switch to one of the other backends (which do not 
require a C extension as a bridge between matplotlib and GUI framework), 
such as GtkAgg, Qt4Agg, WxAgg etc. See here to learn how to switch 
backends:
http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend
Mike
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Alan G I. <ala...@gm...> - 2010年06月09日 16:53:25
On 6/9/2010 9:12 AM, Waléria Antunes David wrote:
> Is there a way to plot my functions in the graph so that one can to 
> visualize the difference between them.
Did you try the example I posted?
Why is it not adequate?
Alan Isaac
On 6/9/2010 8:50 AM, David Goldsmith wrote:
> On Wed, Jun 9, 2010 at 12:18 AM, Christoph Gohlke <cg...@uc...
> <mailto:cg...@uc...>> wrote:
>
>
> On 6/8/2010 11:25 PM, David Goldsmith wrote:
>
> On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke
> <cg...@uc... <mailto:cg...@uc...>
> <mailto:cg...@uc... <mailto:cg...@uc...>>> wrote:
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> <d.l...@gm... <mailto:d.l...@gm...>
> <mailto:d.l...@gm...
> <mailto:d.l...@gm...>>> wrote:
>
> On Tue, Jun 8, 2010 at 9:52 AM, David
> Goldsmith<d.l...@gm...
> <mailto:d.l...@gm...>
> <mailto:d.l...@gm... <mailto:d.l...@gm...>>>
>
> wrote:
>
>
> --------- Forwarded message ----------
> From: SourceForge.net<no...@so...
> <mailto:no...@so...>
> <mailto:no...@so... <mailto:no...@so...>>>
> Date: Mon, Jun 7, 2010 at 6:06 AM
> Subject: [ matplotlib-Bugs-2949906 ]
> finance.quotes_historical_yahoo
> raises ZeroDivisionError
> To: no...@so...
> <mailto:no...@so...> <mailto:no...@so...
> <mailto:no...@so...>>
>
> Bugs item #2949906, was opened at 2010年02月11日 13:44
> Message generated for change (Comment added)
> made by jdh2358
> You can respond by visiting:
>
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>>
>
> Category: None
> Group: None
> Status: Closed
> Resolution: Duplicate
> Priority: 5
> Private: No
> Submitted By: David Goldsmith (olydlg)
>
> Assigned to: John Hunter (jdh2358)
>
> Summary: finance.quotes_historical_yahoo raises
> ZeroDivisionError
>
> Comment By: John Hunter (jdh2358)
>
> Date: 2010年06月07日 08:06
>
> Message:
> This is fixed in svn 8392. Look for it in the
> upcoming
> release. Please
> test from svn if you are able
>
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>
> Thanks for the report,
> JDH
>
> Hi, John, etc. I checked-out current revision
> (8396 I
> believe), tried to
> build using python setup.py build, got error:
> Unable to
> find vcvarsall.bat.
> Googled, determined that it was something I'm
> supposed
> to get w/ a VC
> runtime, so grabbed the most recent version
> (VC2010 or
> some such),
> installed, determined that I now have a
> vcvarsall.bat
> and added it's
> location to my path, but am still getting the error.
> Any ideas?
> Windows 7 home prem. 64 bit. Python 2.6. Thanks!
>
> DG
>
>
> Oh, and the error happens after building
> 'matplotlib.ft2font' extension.
> Thanks again,
>
>
> Perhaps Christoph, who builds the win32 binaries, can
> let you know
> what he does. It's never as simple a python setup.py
> install,
> though.
> You may want to look in the release/win32 directory at the
> README.txt
> and Makefile.
>
>
> You need Visual Studio 2008 (MSVC9) to compile extensions
> for Python
> >=2.6 on Windows. "python setup.py build" works once you have built
> the prerequisites. See
> <http://matplotlib.sourceforge.net/users/installing.html>. I link
> against the static libraries of libpng, zlib, and freetype,
>
>
> I don't already have those - where do I get them, please?
>
>
> http://www.libpng.org/pub/png/libpng.html
> http://freetype.sourceforge.net/
> http://www.zlib.net/
>
> It is best to build those libraries yourself, with exactly the same
> compiler and runtime
>
>
> Is there a way to determine these if I used the build delivered via
> http://python.org/ftp/python/2.6.5/python-2.6.5.amd64.msi?
C:\Python26\python.exe
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.python_compiler()
'MSC v.1500 32 bit (Intel)'
This is the Visual Studio 2008 compiler. I think this is also mentioned 
in the release notes. The C runtime library is the default used by 
VS2008. You can verify the version with a tool like Dependency Walker. I 
just mentioned it because VS2008 SP1 comes with a new revision of the C 
runtime, which is not enabled by default - keep it that way. I use the 
/MD switch when compiling libraries for Python extensions.
-- 
Christoph
From: Robert S. <rob...@gm...> - 2010年06月09日 14:48:06
Hi,
I've installed matplotlib in a virtual environment but am having a problem
with generating a plot.
I've tried to run a "simple_plot.py" both as a script and from within the
ipython/python shell.
I've changed the backend in
virtualenvs/.../lib/python2.6/site-packages/matplotlig/mpl-data/matplotlibrc
to: "backend : TkAgg"
from the within the virtualenv (regular python) shell I can:
>>> import _tkinter
>>> import Tkinter
>>> Tkinter._test()
(and the test window opens as expected)
My virtualenv sys.path includes:
"/home/virtualenvs/.../lib/python2.6/lib-tk'
When I try to use ipython -pylab (or run a script) I'm getting an error:
 .... import _tkagg
ImportError: No module named _tkagg
I'm assuming that there's a relatively simple fix for this related to the
"matplotlibrc" backend but can't for the life of me work out how to get it
fixed. I'd be grateful for any help.
Many thanks,
Rob
From: John H. <jd...@gm...> - 2010年06月09日 14:16:08
On Wed, Jun 9, 2010 at 9:05 AM, Jon Olav Vik <jo...@gm...> wrote:
> I'm trying to make a big plot with smaller insets. I would like to specify the
> new axis rectangle in terms of data coordinates from the original plot. This
> page
> mentions an .xy_tup() method of Transform objects:
> http://www.scipy.org/Cookbook/Matplotlib/Transformations?highlight=%28xy_tup%29
> ...but I cannot seem to find it:
>
Yes, that is out of date. Michael Droettboom did a significant
refactoring of maplotlib transformations years ago. An up to date
tutorial is at
 http://matplotlib.sourceforge.net/users/transforms_tutorial.html
The equivalent call is
 t.transform((x, y))
JDH
From: Jon O. V. <jo...@gm...> - 2010年06月09日 14:06:04
I'm trying to make a big plot with smaller insets. I would like to specify the 
new axis rectangle in terms of data coordinates from the original plot. This 
page 
mentions an .xy_tup() method of Transform objects:
http://www.scipy.org/Cookbook/Matplotlib/Transformations?highlight=%28xy_tup%29
...but I cannot seem to find it:
from pylab import *
t = gca().transData
In [332]: t
Out[332]:
CompositeGenericTransform(TransformWrapper(BlendedAffine2D(
IdentityTransform(),IdentityTransform())), CompositeAffine2D(
BboxTransformFrom(TransformedBbox(Bbox(array(
[[ 0., 0.], [ 1., 1.]])), TransformWrapper(BlendedAffine2D(
IdentityTransform(),IdentityTransform())))), 
BboxTransformTo(TransformedBbox(Bbox(array([[ 0.125, 0.1 ],
 [ 0.9 , 0.9 ]])), BboxTransformTo(TransformedBbox(Bbox(
array([[ 0., 0.], [ 8., 6.]])), Affine2D(array([[ 80., 0., 0.],
 [ 0., 80., 0.],
 [ 0., 0., 1.]]))))))))
In [333]: t.xy_tup
AttributeError: 'CompositeGenericTransform' object has no attribute 'xy_tup'
Has this feature been (re)moved, or am I missing something?
Thanking you in advance,
Jon Olav
From: Dharhas P. <Dha...@tw...> - 2010年06月09日 12:25:53
For some reason, installing inside a virtualenv was the problem. I installed it using easy_install outside of the virtualenv and it worked fine. The virtualenv setup works on the other RHEL5 machine so I'm not sure why it didn't on this one.
thanks,
- dharhas
>>> Benjamin Root <ben...@ou...> 6/8/2010 12:56 PM >>>
Then I haven't a clue. Maybe someone else has some insight?
Ben Root
On Mon, Jun 7, 2010 at 4:10 PM, Dharhas Pothina <
Dha...@tw...> wrote:
> Ben,
>
> The matplotlib on the other working machine is using python 2.6.4. On this
> machine I am using python 2.6.5.
>
> The default python on both machines in python 2.4 but I set up python 2.6
> as an alternate install in /opt/python26.
>
> - dharhas
>
>
> >>> Benjamin Root <ben...@ou...> 6/7/2010 3:56 PM >>>
> Dharhas,
>
> Is it possible to find out which version of python was installed for your
> other RHEL5 machine? I don't know if that makes a difference or not, but
> RHEL5 by default uses Python 2.4.
>
> Ben Root
>
>
> On Mon, Jun 7, 2010 at 1:48 PM, Dharhas Pothina <
> Dha...@tw...> wrote:
>
> > Hi,
> >
> > I have Python 2.6 installed on RHEL5 (and Numpy 1.4.1) and am trying to
> > install matplotlib. Installation occurs without any error messages
> although
> > I do get a bunch of warnings at the end.
> >
> > /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching
> for
> > -ltk8.4
> > /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching
> > for -ltcl8.4
> > /usr/bin/ld: skipping incompatible /usr/lib/libfreetype.so when searching
> > for -lfreetype
> > /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for
> -lz
> > /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
> > /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for
> -lm
> > /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
> > /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for
> -lm
> > /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
> > /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching
> > for -lpthread
> > /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching
> for
> > -lpthread
> > /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for
> -lc
> > /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
> >
> > When I try using matplotlib I get the following error:
> >
> > Python 2.6.5 (r265:79063, May 18 2010, 11:20:57)
> > [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import matplotlib.pyplot as plt
> > >>> plt.plot([1,0],[2,3])
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > File
> >
> "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/pyplot.py",
> > line 2141, in plot
> > ret = ax.plot(*args, **kwargs)
> > File
> >
> "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py",
> > line 3437, in plot
> > self.autoscale_view(scalex=scalex, scaley=scaley)
> > File
> >
> "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py",
> > line 1624, in autoscale_view
> > XL = self.xaxis.get_major_locator().view_limits(x0, x1)
> > File
> >
> "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/ticker.py",
> > line 1014, in view_limits
> > return np.take(self.bin_boundaries(dmin, dmax), [0,-1])
> > File
> >
> "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/numpy/core/fromnumeric.py",
> > line 103, in take
> > return take(indices, axis, out, mode)
> > IndexError: index out of range for array
> >
> >
> > Any help would be appreciated. I've tried several versions of matplotlib.
> I
> > also was able to get it installed on a different RHEL5 machine a while
> back
> > and am not sure what is different about this machine.
> >
> > thanks
> >
> > - dharhas
> >
> >
> >
> ------------------------------------------------------------------------------
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> > lucky parental unit. See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo 
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li... 
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users 
> >
>
>
On 06/08/2010 10:48 PM, Matthias Michler wrote:
> On Friday, April 23, 2010 11:08:50 am Matthias Michler wrote:
>> Hello list, Hello developers,
>>
>> I'd like to summarize my discussion with Gökhan ("Turning off minor grids
>> on log scaled plot") in the last days and propose two patches.
>>
>> The first patch adds the keyword argument 'which' from the axis.grid to the
>> method 'grid' of the Axes (axes_grid_for_major_and_minor_ticks.patch). This
>> allows to change the drawing of grid lines for x- and y-axis at the same
>> time.
>>
>> Furthemore Gökhan proposed to toggle *all* (namely major and minor tick)
>> grid lines after pressing the key 'g'. Therefore the call
>> event.inaxes.grid(), which toggles only the (default) major tick grid
>> lines, is replaced by event.inaxes.grid(which='majorminor') (see
>> toggling_all_tick_grid_lines.patch).
>> This yields the expected behavior if e.g. all (major and minor) tick grid
>> lines are shown, because than toggling the grid means to remove all grid
>> lines. But to be honest I'm not sure the latter is the intended behavior in
>> all cases. For instance in the case of shown major tick lines toggling all
>> means turning off major tick lines and turning on minor tick lines by
>> pressing 'g'. This sounds a little bit crazy to me, although that's
>> what toggling is about.
I think that behavior would indeed drive the user crazy, so I would not 
want to commit a patch that does that.
Eric
>>
>> Thanks in advance for any comments.
>>
>> Kind regards,
>> Matthias
>
> Hello list,
>
> Does anybody think the proposed patches could be useful?
>
> If somebody would benefit from them I'd be happy to place an updated version of
> the patch(es) at the patch tracker.
>
> Thanks in advance for any comments.
>
> Kind regards,
> Matthias
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 6/8/2010 11:25 PM, David Goldsmith wrote:
> On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke <cg...@uc...
> <mailto:cg...@uc...>> wrote:
>
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> <d.l...@gm... <mailto:d.l...@gm...>> wrote:
>
> On Tue, Jun 8, 2010 at 9:52 AM, David
> Goldsmith<d.l...@gm...
> <mailto:d.l...@gm...>>
> wrote:
>
>
> --------- Forwarded message ----------
> From: SourceForge.net<no...@so...
> <mailto:no...@so...>>
> Date: Mon, Jun 7, 2010 at 6:06 AM
> Subject: [ matplotlib-Bugs-2949906 ]
> finance.quotes_historical_yahoo
> raises ZeroDivisionError
> To: no...@so... <mailto:no...@so...>
>
> Bugs item #2949906, was opened at 2010年02月11日 13:44
> Message generated for change (Comment added) made by jdh2358
> You can respond by visiting:
>
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>
>
> Category: None
> Group: None
> Status: Closed
> Resolution: Duplicate
> Priority: 5
> Private: No
> Submitted By: David Goldsmith (olydlg)
>
> Assigned to: John Hunter (jdh2358)
>
> Summary: finance.quotes_historical_yahoo raises
> ZeroDivisionError
>
> Comment By: John Hunter (jdh2358)
>
> Date: 2010年06月07日 08:06
>
> Message:
> This is fixed in svn 8392. Look for it in the upcoming
> release. Please
> test from svn if you are able
>
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>
> Thanks for the report,
> JDH
>
> Hi, John, etc. I checked-out current revision (8396 I
> believe), tried to
> build using python setup.py build, got error: Unable to
> find vcvarsall.bat.
> Googled, determined that it was something I'm supposed
> to get w/ a VC
> runtime, so grabbed the most recent version (VC2010 or
> some such),
> installed, determined that I now have a vcvarsall.bat
> and added it's
> location to my path, but am still getting the error.
> Any ideas?
> Windows 7 home prem. 64 bit. Python 2.6. Thanks!
>
> DG
>
>
> Oh, and the error happens after building
> 'matplotlib.ft2font' extension.
> Thanks again,
>
>
> Perhaps Christoph, who builds the win32 binaries, can let you know
> what he does. It's never as simple a python setup.py install,
> though.
> You may want to look in the release/win32 directory at the
> README.txt
> and Makefile.
>
>
> You need Visual Studio 2008 (MSVC9) to compile extensions for Python
> >=2.6 on Windows. "python setup.py build" works once you have built
> the prerequisites. See
> <http://matplotlib.sourceforge.net/users/installing.html>. I link
> against the static libraries of libpng, zlib, and freetype,
>
>
> I don't already have those - where do I get them, please?
>
http://www.libpng.org/pub/png/libpng.html
http://freetype.sourceforge.net/
http://www.zlib.net/
It is best to build those libraries yourself, with exactly the same 
compiler and runtime that was used to build Python. Anything else is 
prone to crash.
--
Christoph
On 6/8/2010 11:10 PM, David Goldsmith wrote:
> On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke <cg...@uc...
> <mailto:cg...@uc...>> wrote:
>
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> <d.l...@gm... <mailto:d.l...@gm...>> wrote:
>
> On Tue, Jun 8, 2010 at 9:52 AM, David
> Goldsmith<d.l...@gm...
> <mailto:d.l...@gm...>>
> wrote:
>
>
> --------- Forwarded message ----------
> From: SourceForge.net<no...@so...
> <mailto:no...@so...>>
> Date: Mon, Jun 7, 2010 at 6:06 AM
> Subject: [ matplotlib-Bugs-2949906 ]
> finance.quotes_historical_yahoo
> raises ZeroDivisionError
> To: no...@so... <mailto:no...@so...>
>
> Bugs item #2949906, was opened at 2010年02月11日 13:44
> Message generated for change (Comment added) made by jdh2358
> You can respond by visiting:
>
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>
>
> Category: None
> Group: None
> Status: Closed
> Resolution: Duplicate
> Priority: 5
> Private: No
> Submitted By: David Goldsmith (olydlg)
>
> Assigned to: John Hunter (jdh2358)
>
> Summary: finance.quotes_historical_yahoo raises
> ZeroDivisionError
>
> Comment By: John Hunter (jdh2358)
>
> Date: 2010年06月07日 08:06
>
> Message:
> This is fixed in svn 8392. Look for it in the upcoming
> release. Please
> test from svn if you are able
>
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>
> Thanks for the report,
> JDH
>
> Hi, John, etc. I checked-out current revision (8396 I
> believe), tried to
> build using python setup.py build, got error: Unable to
> find vcvarsall.bat.
> Googled, determined that it was something I'm supposed
> to get w/ a VC
> runtime, so grabbed the most recent version (VC2010 or
> some such),
> installed, determined that I now have a vcvarsall.bat
> and added it's
> location to my path, but am still getting the error.
> Any ideas?
> Windows 7 home prem. 64 bit. Python 2.6. Thanks!
>
> DG
>
>
> Oh, and the error happens after building
> 'matplotlib.ft2font' extension.
> Thanks again,
>
>
> Perhaps Christoph, who builds the win32 binaries, can let you know
> what he does. It's never as simple a python setup.py install,
> though.
> You may want to look in the release/win32 directory at the
> README.txt
> and Makefile.
>
>
> You need Visual Studio 2008 (MSVC9) to compile extensions for Python
> >=2.6 on Windows. "python setup.py build" works once you have built
> the prerequisites. See
> <http://matplotlib.sourceforge.net/users/installing.html>.
>
>
> Compared to what you've written here, those instructions are incomplete
> and/or out-of-date.
>
> DG
>
> I link against the static libraries of libpng, zlib, and freetype,
> compiled with the /MD switch. You may have to adjust your %LIB% and
> %INCLUDE% environment variables and rename the lib files in order to
> be found by the matplotlib build system.
>
The instructions on that page (reasonably) assume that the developer has 
a working Python build system and knows how to build the required 3rd 
party libraries. This is not matplotlib specific information and is 
better described in the documentation for Python and the libraries.
-- 
Christoph
On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke <cg...@uc...> wrote:
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
>> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
>> <d.l...@gm...> wrote:
>>
>>> On Tue, Jun 8, 2010 at 9:52 AM, David Goldsmith<d.l...@gm...>
>>> wrote:
>>>
>>>>
>>>> --------- Forwarded message ----------
>>>> From: SourceForge.net<no...@so...>
>>>> Date: Mon, Jun 7, 2010 at 6:06 AM
>>>> Subject: [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo
>>>> raises ZeroDivisionError
>>>> To: no...@so...
>>>>
>>>> Bugs item #2949906, was opened at 2010年02月11日 13:44
>>>> Message generated for change (Comment added) made by jdh2358
>>>> You can respond by visiting:
>>>>
>>>>
>>>> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
>>>>
>>>> Category: None
>>>> Group: None
>>>> Status: Closed
>>>> Resolution: Duplicate
>>>> Priority: 5
>>>> Private: No
>>>> Submitted By: David Goldsmith (olydlg)
>>>>
>>>>> Assigned to: John Hunter (jdh2358)
>>>>>
>>>> Summary: finance.quotes_historical_yahoo raises ZeroDivisionError
>>>>
>>>>> Comment By: John Hunter (jdh2358)
>>>>>
>>>> Date: 2010年06月07日 08:06
>>>>
>>>> Message:
>>>> This is fixed in svn 8392. Look for it in the upcoming release. Please
>>>> test from svn if you are able
>>>>
>>>>
>>>> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>>>>
>>>> Thanks for the report,
>>>> JDH
>>>>
>>>> Hi, John, etc. I checked-out current revision (8396 I believe), tried
>>>> to
>>>> build using python setup.py build, got error: Unable to find
>>>> vcvarsall.bat.
>>>> Googled, determined that it was something I'm supposed to get w/ a VC
>>>> runtime, so grabbed the most recent version (VC2010 or some such),
>>>> installed, determined that I now have a vcvarsall.bat and added it's
>>>> location to my path, but am still getting the error. Any ideas?
>>>> Windows 7 home prem. 64 bit. Python 2.6. Thanks!
>>>>
>>>> DG
>>>>
>>>
>>> Oh, and the error happens after building 'matplotlib.ft2font' extension.
>>> Thanks again,
>>>
>>
>> Perhaps Christoph, who builds the win32 binaries, can let you know
>> what he does. It's never as simple a python setup.py install, though.
>> You may want to look in the release/win32 directory at the README.txt
>> and Makefile.
>>
>>
> You need Visual Studio 2008 (MSVC9) to compile extensions for Python >=2.6
> on Windows. "python setup.py build" works once you have built the
> prerequisites. See <
> http://matplotlib.sourceforge.net/users/installing.html>. I link against
> the static libraries of libpng, zlib, and freetype,
I don't already have those - where do I get them, please?
Thanks!
DG
> compiled with the /MD switch. You may have to adjust your %LIB% and
> %INCLUDE% environment variables and rename the lib files in order to be
> found by the matplotlib build system.
>
> -- Christoph
>
-- 
Mathematician: noun, someone who disavows certainty when their uncertainty
set is non-empty, even if that set has measure zero.
Hope: noun, that delusive spirit which escaped Pandora's jar and, with her
lies, prevents mankind from committing a general suicide. (As interpreted
by Robert Graves)
On Tue, Jun 8, 2010 at 10:39 AM, John Hunter <jd...@gm...> wrote:
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> <d.l...@gm...> wrote:
> > On Tue, Jun 8, 2010 at 9:52 AM, David Goldsmith <d.l...@gm...
> >
> > wrote:
> >>
> >> --------- Forwarded message ----------
> >> From: SourceForge.net <no...@so...>
> >> Date: Mon, Jun 7, 2010 at 6:06 AM
> >> Subject: [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo
> >> raises ZeroDivisionError
> >> To: no...@so...
> >>
> >> Bugs item #2949906, was opened at 2010年02月11日 13:44
> >> Message generated for change (Comment added) made by jdh2358
> >> You can respond by visiting:
> >>
> >>
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> >>
> >> Category: None
> >> Group: None
> >> Status: Closed
> >> Resolution: Duplicate
> >> Priority: 5
> >> Private: No
> >> Submitted By: David Goldsmith (olydlg)
> >> >Assigned to: John Hunter (jdh2358)
> >> Summary: finance.quotes_historical_yahoo raises ZeroDivisionError
> >> >Comment By: John Hunter (jdh2358)
> >> Date: 2010年06月07日 08:06
> >>
> >> Message:
> >> This is fixed in svn 8392. Look for it in the upcoming release. Please
> >> test from svn if you are able
> >>
> >>
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
> >>
> >> Thanks for the report,
> >> JDH
> >>
> >> Hi, John, etc. I checked-out current revision (8396 I believe), tried
> to
> >> build using python setup.py build, got error: Unable to find
> vcvarsall.bat.
> >> Googled, determined that it was something I'm supposed to get w/ a VC
> >> runtime, so grabbed the most recent version (VC2010 or some such),
> >> installed, determined that I now have a vcvarsall.bat and added it's
> >> location to my path, but am still getting the error. Any ideas?
> >> Windows 7 home prem. 64 bit. Python 2.6. Thanks!
> >>
> >> DG
> >
> > Oh, and the error happens after building 'matplotlib.ft2font' extension.
> > Thanks again,
>
> Perhaps Christoph, who builds the win32 binaries, can let you know
> what he does. It's never as simple a python setup.py install, though.
> You may want to look in the release/win32 directory at the README.txt
> and Makefile.
>
That's for building Win32 binaries using Mingw.
DG
-- 
Mathematician: noun, someone who disavows certainty when their uncertainty
set is non-empty, even if that set has measure zero.
Hope: noun, that delusive spirit which escaped Pandora's jar and, with her
lies, prevents mankind from committing a general suicide. (As interpreted
by Robert Graves)
From: Thøger E. J. T. <th...@fy...> - 2010年06月08日 23:56:32
Thanks guys for your advice.
My mail server has been weird since yesterday so I only just saw your
messages now. In the meantime, I managed to hack and extend the
LineBuilder class code snippet at http://goo.gl/RLGS to actually meet my
needs better than ginput - but, obviously, much less portable and
elegant; I have only been working with Python for a couple of weeks.
On Mon, 2010年06月07日 at 09:29 -0400, Jae-Joon Lee wrote:
> I think this is a known bug (unfortunately, the bug fix does not seem
> to be reflected in the maintenance version), but without a full
> traceback, I'm not 100% sure.
> 
> You may use the svn version which have fixed this bug, or you may try
> the workaround described in the link below (check the
> clabel_monkeypatching.py).
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=2922835&group_id=80706&atid=560720
> 
> -JJ
> 
> 
> 
> 2010年6月4日 Thøger Emil Juul Thorsen <th...@fy...>:
> > Hello list;
> >
> > I'm new to python/matplotlib, migrating from IDL. I need to do some
> > interactive point selection with mouse, and the pyplot.ginput() routine
> > seemed to be just the right thing here. I do however need to be able to
> > make a not previously specified number of clicks, so ginput(n=0) is a
> > requirement.
> >
> > However, when I press enter on my laptop (with no middle mouse button),
> > I get the error message:
> >
> > TypeError: stop_event_loop() takes exactly 1 argument (2 given)
> >
> > I've tried two different pieces of example code from the matplotlib SF
> > page.
> > I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
> > Is there any solution or workaround? If I cannot have this
> > functionality, it is, unfortunately, kind of a deal breaker for at least
> > some of my work, and I'd like to keep it purely Python.
> >
> > Best regards;
> >
> > Emil
> >
> >
> > ------------------------------------------------------------------------------
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> > lucky parental unit. See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
From: mdekauwe <mde...@gm...> - 2010年06月08日 23:50:12
Note - in case it isn't clear that white space between where I mention the
example and the image is what I am referring to and below it again. 
mdekauwe wrote:
> 
> Hi,
> 
> when I make plots with the Basemap package I seem to be getting a large
> amount of white space at the top and bottom of the plot, even if I use the
> option bbox_inches='tight'. Does anyone know how I can stop this
> happening?
> 
> Example image...
> 
> http://old.nabble.com/file/p28824528/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpg 
> 
> What I am currently doing...
> 
> def makeMap(image, ofname, imageMin, imageMax, ticks):
> """ dump out the array as a nice map... """
> fig = plt.figure(figsize=(8, 6))
> m = Basemap(projection='cyl', llcrnrlon=-179.5, llcrnrlat=-60.0, \
> urcrnrlon=179.5, urcrnrlat=89.5, resolution='c')
> # add an axes, leaving room for colorbar on the right.
> ax = fig.add_axes([0.1, 0.1, 0.7, 0.7])
> m.ax = ax
> colourmap = plt.cm.RdYlBu
> colourmap.set_bad('w', 1.0)
> im = m.imshow(image, colourmap, colors.Normalize(vmin=imageMin,
> vmax=imageMax, clip=False),\
> interpolation='nearest')
> pos = ax.get_position()
> l, b, w, h = pos.bounds
> cax = plt.axes([l + w + 0.045, b, 0.05, h])
> norm = colors.BoundaryNorm(ticks, colourmap.N)
> cbar = mpl.colorbar.ColorbarBase(cax, cmap=colourmap, norm=norm,
> ticks=ticks)
> #cbar = plt.colorbar(im, cax=cax)
> # xlabel and ylabel were overwriting the tick labels so i need to move
> them
> # transAxes set the position from the bottom left of the axes (1,1
> would be the top right)
> ax.text(0.5, -0.15, 'Longitude', transform=ax.transAxes, ha='center',
> va='center')
> ax.text(-0.1, 0.5, 'Latitude', transform=ax.transAxes, ha= 'center',
> va='center', rotation='vertical')
> #ax.set_title("Sign.Different: GSPW2 - Princeton")
> m.drawcoastlines(linewidth=0.2, color='k')
> m.drawcountries(linewidth=0.1, color='k')
> #m.drawrivers()
> m.drawparallels(np.array([-90.0, -60.0, -30.0, 0.0, 30.0, 60.0,
> 90.0]), labels=[1,0,0,1],\
> fontsize=10, rotation=20)
> m.drawmeridians(np.array([-180.0, -120.0, -60.0, 0.0, 60.0, 120.0,
> 180.0]), labels=[0,0,0,1], \
> fontsize=10, rotation=20)
> fig.savefig(ofname + '.png', dpi=300, bbox_inches='tight')
> # for LaTeX doc...
> fig.savefig(os.path.join("/users/eow/mgdk/doc/snowy_notes/figures/",
> (ofname + ".eps")), dpi=300,\
> bbox_inches='tight')
> 
> Many thanks,
> 
> Martin
> 
-- 
View this message in context: http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28824544.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: mdekauwe <mde...@gm...> - 2010年06月08日 23:47:46
Hi,
when I make plots with the Basemap package I seem to be getting a large
amount of white space at the top and bottom of the plot, even if I use the
option bbox_inches='tight'. Does anyone know how I can stop this happening?
Example image...
http://old.nabble.com/file/p28824528/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpg 
What I am currently doing...
def makeMap(image, ofname, imageMin, imageMax, ticks):
 """ dump out the array as a nice map... """
 fig = plt.figure(figsize=(8, 6))
 m = Basemap(projection='cyl', llcrnrlon=-179.5, llcrnrlat=-60.0, \
 urcrnrlon=179.5, urcrnrlat=89.5, resolution='c')
 # add an axes, leaving room for colorbar on the right.
 ax = fig.add_axes([0.1, 0.1, 0.7, 0.7])
 m.ax = ax
 colourmap = plt.cm.RdYlBu
 colourmap.set_bad('w', 1.0)
 im = m.imshow(image, colourmap, colors.Normalize(vmin=imageMin,
vmax=imageMax, clip=False),\
 interpolation='nearest')
 pos = ax.get_position()
 l, b, w, h = pos.bounds
 cax = plt.axes([l + w + 0.045, b, 0.05, h])
 norm = colors.BoundaryNorm(ticks, colourmap.N)
 cbar = mpl.colorbar.ColorbarBase(cax, cmap=colourmap, norm=norm,
ticks=ticks)
 #cbar = plt.colorbar(im, cax=cax)
 # xlabel and ylabel were overwriting the tick labels so i need to move
them
 # transAxes set the position from the bottom left of the axes (1,1 would
be the top right)
 ax.text(0.5, -0.15, 'Longitude', transform=ax.transAxes, ha='center',
va='center')
 ax.text(-0.1, 0.5, 'Latitude', transform=ax.transAxes, ha= 'center',
va='center', rotation='vertical')
 #ax.set_title("Sign.Different: GSPW2 - Princeton")
 m.drawcoastlines(linewidth=0.2, color='k')
 m.drawcountries(linewidth=0.1, color='k')
 #m.drawrivers()
 m.drawparallels(np.array([-90.0, -60.0, -30.0, 0.0, 30.0, 60.0, 90.0]), 
labels=[1,0,0,1],\
 fontsize=10, rotation=20)
 m.drawmeridians(np.array([-180.0, -120.0, -60.0, 0.0, 60.0, 120.0,
180.0]), labels=[0,0,0,1], \
 fontsize=10, rotation=20)
 fig.savefig(ofname + '.png', dpi=300, bbox_inches='tight')
 # for LaTeX doc...
 fig.savefig(os.path.join("/users/eow/mgdk/doc/snowy_notes/figures/",
(ofname + ".eps")), dpi=300,\
 bbox_inches='tight')
Many thanks,
Martin
-- 
View this message in context: http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28824528.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Friedrich R. <fri...@gm...> - 2010年06月08日 23:09:38
Z = numpy.zeros((y_shape, x_shape))
x = your_flat_indices_in_x
y = your_flat_indices_in_y
z = your_flat_z_data
If you have only coordinates, then try to figure out the indices in
some way. Then do:
Z[zip(y, x)] = z
and figure out the coordinates that correspond to the mesh meant by Z.
It's "fancy indexing".
>>> Z = numpy.zeros((2, 2))
>>> x = numpy.asarray([0, 1])
>>> y = numpy.asarray([0, 0])
>>> z = numpy.asarray([10, 42])
>>> Z[zip(y, x)] = z
>>> Z
array([[ 10., 42.],
 [ 0., 0.]])
hth and is appropriate,
Friedrich
From: Eric F. <ef...@ha...> - 2010年06月08日 22:42:43
On 06/08/2010 12:33 PM, Eric Firing wrote:
> On 06/08/2010 12:25 PM, Eric Firing wrote:
>> On 06/08/2010 11:16 AM, Thomas Robitaille wrote:
>>> Hello,
>>>
>>> I have submitted a bug report with full error transcript here:
>>>
>>> https://sourceforge.net/tracker/?func=detail&aid=3013440&group_id=80706&atid=560720
>>
>> Tom,
>>
>> Thanks. I don't see anything MaxOSX backend-specific about this,
>> though, and I can't reproduce it here on Linux. Did you do a clean
>> build and install, deleting the build directory and the previous
>> installation?
>>
>> Eric
>
>
> Aha! I see the problem: _macosx is overriding the
> GraphicsContextBase.set_alpha. This is easy to fix. Coming shortly.
Committed in 8398. Please let me know if it fixes the problem, and if 
any other problems crop up.
Eric
>
> Eric
>
>>
>>>
>>> Cheers,
>>>
>>> Tom
From: Eric F. <ef...@ha...> - 2010年06月08日 22:33:54
On 06/08/2010 12:25 PM, Eric Firing wrote:
> On 06/08/2010 11:16 AM, Thomas Robitaille wrote:
>> Hello,
>>
>> I updated to svn r8396 today, and the MacOSX backend is broken. The following code
>>
>> import matplotlib
>> matplotlib.use('MacOSX')
>> import matplotlib.pyplot as mpl
>>
>> fig = mpl.figure()
>> ax = fig.add_subplot(1,1,1)
>> fig.canvas.draw()
>>
>> produces the following error:
>>
>> File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/lines.py", line 522, in draw
>> gc.set_alpha(self._alpha)
>> TypeError: a float is required
>>
>> I have submitted a bug report with full error transcript here:
>>
>> https://sourceforge.net/tracker/?func=detail&aid=3013440&group_id=80706&atid=560720
>
> Tom,
>
> Thanks. I don't see anything MaxOSX backend-specific about this,
> though, and I can't reproduce it here on Linux. Did you do a clean
> build and install, deleting the build directory and the previous
> installation?
>
> Eric
Aha! I see the problem: _macosx is overriding the 
GraphicsContextBase.set_alpha. This is easy to fix. Coming shortly.
Eric
>
>>
>> Cheers,
>>
>> Tom
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit. See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Eric F. <ef...@ha...> - 2010年06月08日 22:25:47
On 06/08/2010 11:16 AM, Thomas Robitaille wrote:
> Hello,
>
> I updated to svn r8396 today, and the MacOSX backend is broken. The following code
>
> import matplotlib
> matplotlib.use('MacOSX')
> import matplotlib.pyplot as mpl
>
> fig = mpl.figure()
> ax = fig.add_subplot(1,1,1)
> fig.canvas.draw()
>
> produces the following error:
>
> File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/lines.py", line 522, in draw
> gc.set_alpha(self._alpha)
> TypeError: a float is required
>
> I have submitted a bug report with full error transcript here:
>
> https://sourceforge.net/tracker/?func=detail&aid=3013440&group_id=80706&atid=560720
Tom,
Thanks. I don't see anything MaxOSX backend-specific about this, 
though, and I can't reproduce it here on Linux. Did you do a clean 
build and install, deleting the build directory and the previous 
installation?
Eric
>
> Cheers,
>
> Tom
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Nikolaus R. <Nik...@ra...> - 2010年06月08日 21:56:04
Hi,
I have a 1d array Z that unfortunately contains information about a two
dimensional surface. The mapping is nontrivial (i.e. Z is not just a
sequence of column or row information that I could reshape) but
homogenous (i.e. there is a rectangular grid and Z contains data for
each vertex). The x and y coordinates for each datapoint in Z are
contained in separate arrays X and Y.
A simple pyplot.contour(X, Y, Z) refuses to plot the data because Z is
not 2d ("TypeError: Input z must be a 2D array").
What's the best way to plot this data?
Is there an easy way to reshuffle the elements of Z so that they are in
either row-column or column-row order?
Best,
 -Nikolaus
-- 
 »Time flies like an arrow, fruit flies like a Banana.«
 PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
19 messages has been excluded from this view by a project administrator.

Showing results of 397

<< < 1 .. 8 9 10 11 12 .. 16 > >> (Page 10 of 16)
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 によって変換されたページ (->オリジナル) /