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






Showing 21 results of 21

From: Benjamin R. <ben...@ou...> - 2010年10月06日 23:57:23
On Wed, Oct 6, 2010 at 1:06 PM, Michael Cracraft <mic...@gm...
> wrote:
> I have a code that continuously modifies a numpy.ndarray variable. Then, I
> use set_ydata on the matplotlib.lines.Line2D object to the same ndarray
> variable. Then, I call fig.canvas.draw() to redraw the figure, where fig is
> Figure object.
>
> However, the line on the graph never changes. I print a few entries to the
> console to make sure that the variable is changing.
>
> It seems like the only way I can get the line to update is to create a
> completely new ndarray, update that variable with the new values and use
> set_ydata on my line object. Then, the redraw works. Other things that I
> tried that didn't seem to work were:
>
> L1.set_ydata(x[:])
> L1.set_ydata(x.tolist())
> L1.set_ydata(list(x))
>
>
> where L1 is my line object, and x is my ndarray. To make it redraw I have
> to do something like this.
>
> xnew = numpy.zeros(numpy.size(x,0))
> for k in range(numpy.size(x,0)):
> xnew[k] = x[k]
> L1.set_ydata(xnew)
> fig.canvas.draw()
>
> Is there some switch I can set to force a redraw of the elements? I feel
> like I am missing something fundamental.
>
> Thanks,
> Michael
>
>
Michael,
Which version of matplotlib are you using? Which backend are you using?
Also, could you include a small script or two that demonstrate the problem?
This way, we can poke around with it and see what is up.
Ben Root
From: Christopher B. <Chr...@no...> - 2010年10月06日 23:32:45
Russell E. Owen wrote:
> For now it is available here:
> <http://www.astro.washington.edu/users/rowen/python/>
> though I hope it will end up on the official site at some point.
> 
> I have not tested the wx back end and would be grateful if somebody had 
> time to do so.
It seems to work for me on OS-X 10.5(PPC), Python.org2.6, wxPython2.8.10
> I propose not having a matplotlib binary installer for Python 2.5 and 
> getting a pair for Python 2.7 32-bit (10.3.9 and later) and 64-bit (10.5 
> and later).
> 
> What do others think?
I think that's fine -- look to the future -- 2.6 is now getting pretty 
old, and there is 2.7 and 3.1 to work with.
Thanks for all your work on this.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Benjamin R. <ben...@ou...> - 2010年10月06日 20:10:32
On Wed, Oct 6, 2010 at 2:36 PM, Waléria Antunes David <
wal...@gm...> wrote:
> Benjamin,
>
> I used the 'ax.set_xscale (' log ')', but the points were even more
> confused. What I need is to increase from 0.0 to 0.2 points, 0.2 to 0.4 ...
> increase the size of the graph. However I do not know if the chart is well
> visualized on a monitor 20''.?
>
>
Are you trying to increase the spacing in the x direction or the y
direction? Log scaling is a standard trick to achieve this effect.
> And how do I let my chart like this:
> http://www.supernova.lbl.gov/PDFs/SCP2003SNeCMBClust.pdf
> This graph format with vertical line on, something like that.
>
>
Are you asking how to add a vertical line to your graph, or how to have only
the vertical grid lines?
Ben Root
From: Russell E. O. <ro...@uw...> - 2010年10月06日 18:22:12
I finally got hold of a Mac that can run 10.4 and was finally able to 
build a new binary installer for Python 2.6 (as well as one for PIL 
1.1.7) is truly compatible with Mac OS X 10.3.9.
For now it is available here:
<http://www.astro.washington.edu/users/rowen/python/>
though I hope it will end up on the official site at some point.
I have not tested the wx back end and would be grateful if somebody had 
time to do so.
I attempted to build a binary installer for Python 2.5.x but ran into 
problems: Mac binaries for Python 2.5 aren't compatible with 3rd party 
versions of Tk, which causes a mess for matplotlib. There are 
workarounds, but given the state of Mac python 2.5 I'm not sure it's 
worth the bother.
I propose not having a matplotlib binary installer for Python 2.5 and 
getting a pair for Python 2.7 32-bit (10.3.9 and later) and 64-bit (10.5 
and later).
What do others think?
-- Russell
From: Michael C. <mic...@gm...> - 2010年10月06日 18:06:57
I have a code that continuously modifies a numpy.ndarray variable. Then, I
use set_ydata on the matplotlib.lines.Line2D object to the same ndarray
variable. Then, I call fig.canvas.draw() to redraw the figure, where fig is
Figure object.
However, the line on the graph never changes. I print a few entries to the
console to make sure that the variable is changing.
It seems like the only way I can get the line to update is to create a
completely new ndarray, update that variable with the new values and use
set_ydata on my line object. Then, the redraw works. Other things that I
tried that didn't seem to work were:
L1.set_ydata(x[:])
L1.set_ydata(x.tolist())
L1.set_ydata(list(x))
where L1 is my line object, and x is my ndarray. To make it redraw I have
to do something like this.
xnew = numpy.zeros(numpy.size(x,0))
for k in range(numpy.size(x,0)):
 xnew[k] = x[k]
L1.set_ydata(xnew)
fig.canvas.draw()
Is there some switch I can set to force a redraw of the elements? I feel
like I am missing something fundamental.
Thanks,
Michael
-- 
_____________________________________________
From: Stan W. <sta...@nr...> - 2010年10月06日 17:52:52
From: Sebastian Rhode [mailto:seb...@go...] 
Sent: Wednesday, September 29, 2010 13:02
 
if I plot an normal figure the toolbar contains an button (looks like a
checkbox), which can be used to edit the lines and axes parameters. But when I
embed such a figure in an Wx application, this specfic button is missing.
Is there a way around it? 
That tool is implemented in the Qt4 backends (and in only those backends, I
believe). If your default backend is Qt4Agg, for example, you would see the
tool when not embedding. For embedding with Wx, you would need the tool
implemented in backend_wx.py, class NavigationToolbar2Wx. Should you like to
look at the Qt4 code, it's in backend_qt4.py, class NavigationToolbar2QT.
From: Friedrich R. <fri...@gm...> - 2010年10月06日 17:28:36
2010年10月6日 Waléria Antunes David <wal...@gm...>:
> I ploted a graph and above this graph I plot another graph about data
> errors.
You can do this in one step by using ax.errorbar()
http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.errorbar
.
Try using fmt=',', this will plot pixels as the markers.
Friedrich
From: Alan G I. <ala...@gm...> - 2010年10月06日 17:25:21
On 10/6/2010 1:13 PM, Waléria Antunes David wrote:
> the x-axis scale according with data errors only goes on 1.4, but I would like to display up to 1.5. how I do that?
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.xlim
> I also want to increase the space between 0.0 - 0.2, 0.2 - 0.4, so on so that points can be better visualized.
Change the figsize:
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figure
hth,
Alan Isaac
From: Benjamin R. <ben...@ou...> - 2010年10月06日 17:25:08
On Wed, Oct 6, 2010 at 12:13 PM, Waléria Antunes David <
wal...@gm...> wrote:
> Hi all,
>
> I ploted a graph and above this graph I plot another graph about data
> errors.
> so, the x-axis scale according with data errors only goes on 1.4, but I
> would like to display up to 1.5. how I do that?
> I also want to increase the space between 0.0 - 0.2, 0.2 - 0.4, so on so
> that points can be better visualized.
>
> My image attached
>
> Thanks,
> Waleria
>
>
To set the x limits:
ax.set_xlim([0.0, 1.5])
To increase the space between 0.0-0.2 and 0.2-0.4, you might want to
consider log scale (although zero values will cause problems)?
ax.set_xscale('log')
Ben Root
From: Ryan M. <rm...@gm...> - 2010年10月06日 16:09:23
On Tue, Oct 5, 2010 at 11:39 PM, Daniel Hyams <dh...@gm...> wrote:
>
> I've run across a strange problem and perhaps I'm misusing something. I was
> trying to set up picking so that I can interact with plotted objects, and I
> get alot of error spew that looks like this:
>
> while checking <class 'matplotlib.lines.Line2D'>
> Traceback (most recent call last):
>  File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 241, in
> hitlist
>   hascursor,info = self.contains(event)
>  File "C:\Python26\lib\site-packages\matplotlib\lines.py", line 286, in
> contains
>   path, affine = self._transformed_path.get_transformed_path_and_affine()
> AttributeError: 'NoneType' object has no attribute
> 'get_transformed_path_and_affine'
>
> This can be reproduced by the following code, even though there is no
> picking involved...just mouse motion. Is there possibly a workaround for
> this, or am I doing something wrong?
>
> import sys
> from pylab import *
>
> ax = subplot(111)
> ax.plot([0,1,2,3])
>
> def on_move(event):
>   if event.inaxes:
>     lst = ax.hitlist(event)
>     print lst
>
> binding_id = connect('motion_notify_event', on_move)
>
>
> show()
It looks like Line2D.contains() was relying on some attributes that
were set by draw(). I'm not sure why those lines are not drawn (it
looks like some axis line?), but contains() shouldn't cause a
traceback regardless. I've fixed this in SVN. If you're not running
SVN, the patch is small, but it should be noted that the error message
you're seeing is purely cosmetic and shouldn't be causing any
problems.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Benjamin R. <ben...@ou...> - 2010年10月06日 14:19:29
On Wed, Oct 6, 2010 at 3:21 AM, Jorge Scandaliaris
<jor...@ya...>wrote:
> Jorge Scandaliaris <jorgesmbox-ml@...> writes:
> >
> > I was running my example with the -pylab option set in ipython, and
> adding a
> > call to plt.ion() doesn't change things. I also run gtkagg backend. I
> guess I
> > have a problem with my installation of matplotlib, unless this is
> something
> > that changed after mpl-1.0. I will try mpl-svn next and see.
> >
>
> Luckily enough, using mpl-svn solved the problem.
>
> BTW, I had issues following the instructions for cloning the git mirror
> (
> http://matplotlib.sourceforge.net/devel/coding_guide.html#cloning-the-git-mirror
> ).
> Something changed in github, or there's typo somewhere?
>
> Instead of:
> # Download the entire git repository into "matplotlib", name the source
> repository "svn".
> git clone --origin svn gi...@gi...:astraw/matplotlib.git
>
> I ended up doing:
> git clone --origin svn git://github.com/astraw/matplotlib.git
>
> The rest of instructions worked fine (at least it seems to me).
>
> Regards,
>
> Jorge
>
>
>
Yeah, those instructions should be changed. The current instructions would
presume that you would use your github username in-place of the 'git'
username. Your command works fine for everyone who just wants to pull from
the repo.
Ben Root
From: Benjamin R. <ben...@ou...> - 2010年10月06日 14:16:26
On Tue, Oct 5, 2010 at 11:39 PM, Daniel Hyams <dh...@gm...> wrote:
>
> I've run across a strange problem and perhaps I'm misusing something. I
> was trying to set up picking so that I can interact with plotted objects,
> and I get alot of error spew that looks like this:
>
> while checking <class 'matplotlib.lines.Line2D'>
> Traceback (most recent call last):
> File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 241, in
> hitlist
> hascursor,info = self.contains(event)
> File "C:\Python26\lib\site-packages\matplotlib\lines.py", line 286, in
> contains
> path, affine = self._transformed_path.get_transformed_path_and_affine()
> AttributeError: 'NoneType' object has no attribute
> 'get_transformed_path_and_affine'
>
> This can be reproduced by the following code, even though there is no
> picking involved...just mouse motion. Is there possibly a workaround for
> this, or am I doing something wrong?
>
> import sys
> from pylab import *
>
> ax = subplot(111)
> ax.plot([0,1,2,3])
>
> def on_move(event):
> if event.inaxes:
> lst = ax.hitlist(event)
> print lst
>
> binding_id = connect('motion_notify_event', on_move)
>
>
> show()
>
>
> --
> Daniel Hyams
> dh...@gm...
>
>
Daniel,
I am not exactly sure of your exact issue, but I did notice something a
little off about your current code. In on_move(), you reference 'ax', but
that is never passed in or defined in the function itself. Therefore, it is
refering to the 'ax' that is in your global namespace. This seems to be a
side issue, however.
Ben Root
From: Robin <ro...@gm...> - 2010年10月06日 13:14:01
On Wed, Oct 6, 2010 at 10:31 AM, Jakub Nowacki <j.s...@gm...> wrote:
> Hi,
>
> Personally I've tried to install Matplotlib 1.0.0 manually in EPD on Mac and
> Linux. For some reason on Linux it went totally OK from the first try (just
> had to define PREFIX correctly). On Mac I've tried to do the same but for
> some reason the libs are linked somehow differently and while the
> installation went OK (at least it didn't complain) mpl didn't work. I admit
> I don't have that much experience with Mac linking but it seems to be the
> issue. BTW have you tried to force 32-bit compilation using 'arch'? I was
> getting such messages when I've tired to run 64-bit module with 32-bit
> Python (didn't specify arch correctly).
Thanks for the information. For me it is the same - the build
completes successfully but I get the bus error when importing pyplot.
I think it is 32 bit... I am installing to a 32 bit Python. Also in
the past when I've had arch errors like that they show up at linking
rather than runtime, and I think from the stack trace it is getting
into the extension module ft2font - if it was 64 vs 32 bit I think it
wouldn't load the .so.
I am not sure if EPD is built with intel compilers and MKL - perhaps
that could be the issue. Unfortunately I don't have intel compiler
available to test.
In the end I built against a fresh python.org 2.7 install and
reinstalled numpy and scipy.
Cheers
Robin
>
> Best wishes,
>
> Jakub
>
>
> On 10/05/2010 03:26 PM, Robin wrote:
>>
>> Hi,
>>
>> I am using EPD 6.2 (32 bit) on a mac.
>>
>> I would like to use subplot grids (matplotlib.gridspec) which seems to
>> require mpl 1.0.0.
>>
>> Is there anyway to install this and use it with EPD? So far I have
>> tried everything from the installation guide, but whatever I do I get
>> a bus error in ft2font.
>>
>> I can't get the wx backend to show up in the config stage (although wx
>> is installed in EPD).
>> I have tried building it myself, with the make.osx script, and with
>> the EPD guide on the installation page, both with gcc 4.0 and gcc 4.2
>> but everything gives the same bus error.
>> I'm actually not sure what compiler is used for EPD so perhaps that is
>> the problem.
>>
>> Alternatively, is there a way to pick out the subplot grid features
>> and use them with the epd matplotlib?
>>
>> If anyone is interested this is the error I get:
>>
>>
>> Exception Type: EXC_BAD_ACCESS (SIGBUS)
>> Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
>> Crashed Thread: 0 Dispatch queue: com.apple.main-thread
>>
>> Thread 0 Crashed: Dispatch queue: com.apple.main-thread
>> 0  ???                 0000000000 0 + 0
>> 1  libSystem.B.dylib          0x96f31108
>> _Unwind_GetLanguageSpecificData + 24
>> 2  libstdc++.6.dylib          0x97166d86 __gxx_personality_v0 +
>> 120
>> 3  libgcc_s.1.dylib          0x0040b476
>> _Unwind_RaiseException_Phase2 + 102 (unwind.inc:68)
>> 4  libgcc_s.1.dylib          0x0040b890 _Unwind_Resume + 112
>> (unwind.inc:238)
>> 5  ft2font.so             0x04501a98
>> FT2Font::FT2Font(std::string) + 4776 (ExtensionOldType.hxx:88)
>> 6  ft2font.so             0x04501fd3
>> ft2font_module::new_ft2font(Py::Tuple const&) + 515 (ft2font.cpp:1969)
>> 7  ft2font.so             0x045041b6
>> Py::ExtensionModule<ft2font_module>::invoke_method_varargs(void*,
>> Py::Tuple const&) + 102 (ExtensionModule.hxx:184)
>> 8  ft2font.so             0x0450db87
>> method_varargs_call_handler + 343
>> 9  org.python.python          0x000cbfd5 PyEval_EvalFrameEx +
>> 19429
>> 10 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 11 org.python.python          0x000cc1bc PyEval_EvalFrameEx +
>> 19916
>> 12 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 13 org.python.python          0x0004b136 function_call + 166
>> 14 org.python.python          0x00019b05 PyObject_Call + 85
>> 15 org.python.python          0x0002c0e6 instancemethod_call +
>> 422
>> 16 org.python.python          0x00019b05 PyObject_Call + 85
>> 17 org.python.python          0x000c642e
>> PyEval_CallObjectWithKeywords + 78
>> 18 org.python.python          0x0002efb2 PyInstance_New + 114
>> 19 org.python.python          0x00019b05 PyObject_Call + 85
>> 20 org.python.python          0x000ca927 PyEval_EvalFrameEx +
>> 13623
>> 21 org.python.python          0x000cc956 PyEval_EvalFrameEx +
>> 21862
>> 22 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 23 org.python.python          0x000ce2d7 PyEval_EvalCode + 87
>> 24 org.python.python          0x000e5a3c
>> PyImport_ExecCodeModuleEx + 188
>> 25 org.python.python          0x000e66dc load_source_module +
>> 540
>> 26 org.python.python          0x000e72fd import_submodule + 301
>> 27 org.python.python          0x000e7559 load_next + 201
>> 28 org.python.python          0x000e7f53
>> PyImport_ImportModuleLevel + 419
>> 29 org.python.python          0x000c09bf builtin___import__ +
>> 159
>> 30 org.python.python          0x00019b05 PyObject_Call + 85
>> 31 org.python.python          0x000c642e
>> PyEval_CallObjectWithKeywords + 78
>> 32 org.python.python          0x000c99c0 PyEval_EvalFrameEx +
>> 9680
>> 33 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 34 org.python.python          0x000ce2d7 PyEval_EvalCode + 87
>> 35 org.python.python          0x000e5a3c
>> PyImport_ExecCodeModuleEx + 188
>> 36 org.python.python          0x000e66dc load_source_module +
>> 540
>> 37 org.python.python          0x000e72fd import_submodule + 301
>> 38 org.python.python          0x000e78a7 ensure_fromlist + 439
>> 39 org.python.python          0x000e833d
>> PyImport_ImportModuleLevel + 1421
>> 40 org.python.python          0x000c09bf builtin___import__ +
>> 159
>> 41 org.python.python          0x00019b05 PyObject_Call + 85
>> 42 org.python.python          0x000c642e
>> PyEval_CallObjectWithKeywords + 78
>> 43 org.python.python          0x000c99c0 PyEval_EvalFrameEx +
>> 9680
>> 44 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 45 org.python.python          0x000ce2d7 PyEval_EvalCode + 87
>> 46 org.python.python          0x000e5a3c
>> PyImport_ExecCodeModuleEx + 188
>> 47 org.python.python          0x000e66dc load_source_module +
>> 540
>> 48 org.python.python          0x000e72fd import_submodule + 301
>> 49 org.python.python          0x000e78a7 ensure_fromlist + 439
>> 50 org.python.python          0x000e833d
>> PyImport_ImportModuleLevel + 1421
>> 51 org.python.python          0x000c09bf builtin___import__ +
>> 159
>> 52 org.python.python          0x00019b05 PyObject_Call + 85
>> 53 org.python.python          0x000c642e
>> PyEval_CallObjectWithKeywords + 78
>> 54 org.python.python          0x000c99c0 PyEval_EvalFrameEx +
>> 9680
>> 55 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 56 org.python.python          0x000ce2d7 PyEval_EvalCode + 87
>> 57 org.python.python          0x000e5a3c
>> PyImport_ExecCodeModuleEx + 188
>> 58 org.python.python          0x000e66dc load_source_module +
>> 540
>> 59 org.python.python          0x000e72fd import_submodule + 301
>> 60 org.python.python          0x000e7559 load_next + 201
>> 61 org.python.python          0x000e7f53
>> PyImport_ImportModuleLevel + 419
>> 62 org.python.python          0x000c09bf builtin___import__ +
>> 159
>> 63 org.python.python          0x00019b05 PyObject_Call + 85
>> 64 org.python.python          0x000c642e
>> PyEval_CallObjectWithKeywords + 78
>> 65 org.python.python          0x000c99c0 PyEval_EvalFrameEx +
>> 9680
>> 66 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 67 org.python.python          0x000cc1bc PyEval_EvalFrameEx +
>> 19916
>> 68 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 69 org.python.python          0x0004b136 function_call + 166
>> 70 org.python.python          0x00019b05 PyObject_Call + 85
>> 71 org.python.python          0x0002c0e6 instancemethod_call +
>> 422
>> 72 org.python.python          0x00019b05 PyObject_Call + 85
>> 73 org.python.python          0x000812c7 slot_tp_init + 87
>> 74 org.python.python          0x0007fcf0 type_call + 176
>> 75 org.python.python          0x00019b05 PyObject_Call + 85
>> 76 org.python.python          0x000c9d9c PyEval_EvalFrameEx +
>> 10668
>> 77 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 78 org.python.python          0x000cc1bc PyEval_EvalFrameEx +
>> 19916
>> 79 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 80 org.python.python          0x0004b136 function_call + 166
>> 81 org.python.python          0x00019b05 PyObject_Call + 85
>> 82 org.python.python          0x0002c0e6 instancemethod_call +
>> 422
>> 83 org.python.python          0x00019b05 PyObject_Call + 85
>> 84 org.python.python          0x000ca927 PyEval_EvalFrameEx +
>> 13623
>> 85 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 86 org.python.python          0x0004b136 function_call + 166
>> 87 org.python.python          0x00019b05 PyObject_Call + 85
>> 88 org.python.python          0x0002c0e6 instancemethod_call +
>> 422
>> 89 org.python.python          0x00019b05 PyObject_Call + 85
>> 90 org.python.python          0x000c642e
>> PyEval_CallObjectWithKeywords + 78
>> 91 org.python.python          0x0002efb2 PyInstance_New + 114
>> 92 org.python.python          0x00019b05 PyObject_Call + 85
>> 93 org.python.python          0x000ca927 PyEval_EvalFrameEx +
>> 13623
>> 94 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 95 org.python.python          0x000cc1bc PyEval_EvalFrameEx +
>> 19916
>> 96 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 97 org.python.python          0x000cc1bc PyEval_EvalFrameEx +
>> 19916
>> 98 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 99 org.python.python          0x000cc1bc PyEval_EvalFrameEx +
>> 19916
>> 100 org.python.python          0x000ce14d PyEval_EvalCodeEx +
>> 2109
>> 101 org.python.python          0x000ce2d7 PyEval_EvalCode + 87
>> 102 org.python.python          0x000f3068 PyRun_FileExFlags + 168
>> 103 org.python.python          0x000f3ff3 PyRun_SimpleFileExFlags
>> + 867
>> 104 org.python.python          0x00105b9b Py_Main + 3371
>> 105 org.python.python          0x00001fb6 0x1000 + 4022
>>
>>
>> Cheers
>>
>> Robin
>>
>>
>> ------------------------------------------------------------------------------
>> Beautiful is writing same markup. Internet Explorer 9 supports
>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3.
>> Spend less time writing and rewriting code and more time creating great
>> experiences on the web. Be a part of the beta today.
>> http://p.sf.net/sfu/beautyoftheweb
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jakub N. <j.s...@gm...> - 2010年10月06日 09:31:55
Hi,
Personally I've tried to install Matplotlib 1.0.0 manually in EPD on Mac 
and Linux. For some reason on Linux it went totally OK from the first 
try (just had to define PREFIX correctly). On Mac I've tried to do the 
same but for some reason the libs are linked somehow differently and 
while the installation went OK (at least it didn't complain) mpl didn't 
work. I admit I don't have that much experience with Mac linking but it 
seems to be the issue. BTW have you tried to force 32-bit compilation 
using 'arch'? I was getting such messages when I've tired to run 64-bit 
module with 32-bit Python (didn't specify arch correctly).
Best wishes,
Jakub
On 10/05/2010 03:26 PM, Robin wrote:
> Hi,
>
> I am using EPD 6.2 (32 bit) on a mac.
>
> I would like to use subplot grids (matplotlib.gridspec) which seems to
> require mpl 1.0.0.
>
> Is there anyway to install this and use it with EPD? So far I have
> tried everything from the installation guide, but whatever I do I get
> a bus error in ft2font.
>
> I can't get the wx backend to show up in the config stage (although wx
> is installed in EPD).
> I have tried building it myself, with the make.osx script, and with
> the EPD guide on the installation page, both with gcc 4.0 and gcc 4.2
> but everything gives the same bus error.
> I'm actually not sure what compiler is used for EPD so perhaps that is
> the problem.
>
> Alternatively, is there a way to pick out the subplot grid features
> and use them with the epd matplotlib?
>
> If anyone is interested this is the error I get:
>
>
> Exception Type: EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
> Crashed Thread: 0 Dispatch queue: com.apple.main-thread
>
> Thread 0 Crashed: Dispatch queue: com.apple.main-thread
> 0 ??? 	0000000000 0 + 0
> 1 libSystem.B.dylib 	0x96f31108
> _Unwind_GetLanguageSpecificData + 24
> 2 libstdc++.6.dylib 	0x97166d86 __gxx_personality_v0 + 120
> 3 libgcc_s.1.dylib 	0x0040b476
> _Unwind_RaiseException_Phase2 + 102 (unwind.inc:68)
> 4 libgcc_s.1.dylib 	0x0040b890 _Unwind_Resume + 112
> (unwind.inc:238)
> 5 ft2font.so 	0x04501a98
> FT2Font::FT2Font(std::string) + 4776 (ExtensionOldType.hxx:88)
> 6 ft2font.so 	0x04501fd3
> ft2font_module::new_ft2font(Py::Tuple const&) + 515 (ft2font.cpp:1969)
> 7 ft2font.so 	0x045041b6
> Py::ExtensionModule<ft2font_module>::invoke_method_varargs(void*,
> Py::Tuple const&) + 102 (ExtensionModule.hxx:184)
> 8 ft2font.so 	0x0450db87 method_varargs_call_handler + 343
> 9 org.python.python 	0x000cbfd5 PyEval_EvalFrameEx + 19429
> 10 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 11 org.python.python 	0x000cc1bc PyEval_EvalFrameEx + 19916
> 12 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 13 org.python.python 	0x0004b136 function_call + 166
> 14 org.python.python 	0x00019b05 PyObject_Call + 85
> 15 org.python.python 	0x0002c0e6 instancemethod_call + 422
> 16 org.python.python 	0x00019b05 PyObject_Call + 85
> 17 org.python.python 	0x000c642e PyEval_CallObjectWithKeywords + 78
> 18 org.python.python 	0x0002efb2 PyInstance_New + 114
> 19 org.python.python 	0x00019b05 PyObject_Call + 85
> 20 org.python.python 	0x000ca927 PyEval_EvalFrameEx + 13623
> 21 org.python.python 	0x000cc956 PyEval_EvalFrameEx + 21862
> 22 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 23 org.python.python 	0x000ce2d7 PyEval_EvalCode + 87
> 24 org.python.python 	0x000e5a3c PyImport_ExecCodeModuleEx + 188
> 25 org.python.python 	0x000e66dc load_source_module + 540
> 26 org.python.python 	0x000e72fd import_submodule + 301
> 27 org.python.python 	0x000e7559 load_next + 201
> 28 org.python.python 	0x000e7f53 PyImport_ImportModuleLevel + 419
> 29 org.python.python 	0x000c09bf builtin___import__ + 159
> 30 org.python.python 	0x00019b05 PyObject_Call + 85
> 31 org.python.python 	0x000c642e PyEval_CallObjectWithKeywords + 78
> 32 org.python.python 	0x000c99c0 PyEval_EvalFrameEx + 9680
> 33 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 34 org.python.python 	0x000ce2d7 PyEval_EvalCode + 87
> 35 org.python.python 	0x000e5a3c PyImport_ExecCodeModuleEx + 188
> 36 org.python.python 	0x000e66dc load_source_module + 540
> 37 org.python.python 	0x000e72fd import_submodule + 301
> 38 org.python.python 	0x000e78a7 ensure_fromlist + 439
> 39 org.python.python 	0x000e833d PyImport_ImportModuleLevel + 1421
> 40 org.python.python 	0x000c09bf builtin___import__ + 159
> 41 org.python.python 	0x00019b05 PyObject_Call + 85
> 42 org.python.python 	0x000c642e PyEval_CallObjectWithKeywords + 78
> 43 org.python.python 	0x000c99c0 PyEval_EvalFrameEx + 9680
> 44 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 45 org.python.python 	0x000ce2d7 PyEval_EvalCode + 87
> 46 org.python.python 	0x000e5a3c PyImport_ExecCodeModuleEx + 188
> 47 org.python.python 	0x000e66dc load_source_module + 540
> 48 org.python.python 	0x000e72fd import_submodule + 301
> 49 org.python.python 	0x000e78a7 ensure_fromlist + 439
> 50 org.python.python 	0x000e833d PyImport_ImportModuleLevel + 1421
> 51 org.python.python 	0x000c09bf builtin___import__ + 159
> 52 org.python.python 	0x00019b05 PyObject_Call + 85
> 53 org.python.python 	0x000c642e PyEval_CallObjectWithKeywords + 78
> 54 org.python.python 	0x000c99c0 PyEval_EvalFrameEx + 9680
> 55 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 56 org.python.python 	0x000ce2d7 PyEval_EvalCode + 87
> 57 org.python.python 	0x000e5a3c PyImport_ExecCodeModuleEx + 188
> 58 org.python.python 	0x000e66dc load_source_module + 540
> 59 org.python.python 	0x000e72fd import_submodule + 301
> 60 org.python.python 	0x000e7559 load_next + 201
> 61 org.python.python 	0x000e7f53 PyImport_ImportModuleLevel + 419
> 62 org.python.python 	0x000c09bf builtin___import__ + 159
> 63 org.python.python 	0x00019b05 PyObject_Call + 85
> 64 org.python.python 	0x000c642e PyEval_CallObjectWithKeywords + 78
> 65 org.python.python 	0x000c99c0 PyEval_EvalFrameEx + 9680
> 66 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 67 org.python.python 	0x000cc1bc PyEval_EvalFrameEx + 19916
> 68 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 69 org.python.python 	0x0004b136 function_call + 166
> 70 org.python.python 	0x00019b05 PyObject_Call + 85
> 71 org.python.python 	0x0002c0e6 instancemethod_call + 422
> 72 org.python.python 	0x00019b05 PyObject_Call + 85
> 73 org.python.python 	0x000812c7 slot_tp_init + 87
> 74 org.python.python 	0x0007fcf0 type_call + 176
> 75 org.python.python 	0x00019b05 PyObject_Call + 85
> 76 org.python.python 	0x000c9d9c PyEval_EvalFrameEx + 10668
> 77 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 78 org.python.python 	0x000cc1bc PyEval_EvalFrameEx + 19916
> 79 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 80 org.python.python 	0x0004b136 function_call + 166
> 81 org.python.python 	0x00019b05 PyObject_Call + 85
> 82 org.python.python 	0x0002c0e6 instancemethod_call + 422
> 83 org.python.python 	0x00019b05 PyObject_Call + 85
> 84 org.python.python 	0x000ca927 PyEval_EvalFrameEx + 13623
> 85 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 86 org.python.python 	0x0004b136 function_call + 166
> 87 org.python.python 	0x00019b05 PyObject_Call + 85
> 88 org.python.python 	0x0002c0e6 instancemethod_call + 422
> 89 org.python.python 	0x00019b05 PyObject_Call + 85
> 90 org.python.python 	0x000c642e PyEval_CallObjectWithKeywords + 78
> 91 org.python.python 	0x0002efb2 PyInstance_New + 114
> 92 org.python.python 	0x00019b05 PyObject_Call + 85
> 93 org.python.python 	0x000ca927 PyEval_EvalFrameEx + 13623
> 94 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 95 org.python.python 	0x000cc1bc PyEval_EvalFrameEx + 19916
> 96 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 97 org.python.python 	0x000cc1bc PyEval_EvalFrameEx + 19916
> 98 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 99 org.python.python 	0x000cc1bc PyEval_EvalFrameEx + 19916
> 100 org.python.python 	0x000ce14d PyEval_EvalCodeEx + 2109
> 101 org.python.python 	0x000ce2d7 PyEval_EvalCode + 87
> 102 org.python.python 	0x000f3068 PyRun_FileExFlags + 168
> 103 org.python.python 	0x000f3ff3 PyRun_SimpleFileExFlags + 867
> 104 org.python.python 	0x00105b9b Py_Main + 3371
> 105 org.python.python 	0x00001fb6 0x1000 + 4022
>
>
> Cheers
>
> Robin
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jorge S. <jor...@ya...> - 2010年10月06日 08:21:58
Jorge Scandaliaris <jorgesmbox-ml@...> writes:
> 
> I was running my example with the -pylab option set in ipython, and adding a
> call to plt.ion() doesn't change things. I also run gtkagg backend. I guess I
> have a problem with my installation of matplotlib, unless this is something 
> that changed after mpl-1.0. I will try mpl-svn next and see.
> 
Luckily enough, using mpl-svn solved the problem. 
BTW, I had issues following the instructions for cloning the git mirror
(http://matplotlib.sourceforge.net/devel/coding_guide.html#cloning-the-git-mirror).
Something changed in github, or there's typo somewhere?
Instead of:
# Download the entire git repository into "matplotlib", name the source
repository "svn".
git clone --origin svn gi...@gi...:astraw/matplotlib.git
I ended up doing:
git clone --origin svn git://github.com/astraw/matplotlib.git
The rest of instructions worked fine (at least it seems to me).
Regards,
Jorge
From: Jorge S. <jor...@ya...> - 2010年10月06日 06:31:28
Eric Firing <efiring@...> writes:
>
> For this to work, you need to be in matplotlib's interactive mode, 
> either by running ipython with the -pylab option, or by calling 
> plt.ion() before your call to show(). In either of these cases, your 
> example code works for me with ipython from git, mpl from svn, and using 
> drag/drop to enter the code in ipython. I am also on ubuntu 10.10, 
> 64-bit, with gtkagg backend.
> 
> Eric
> 
I was running my example with the -pylab option set in ipython, and adding a
call to plt.ion() doesn't change things. I also run gtkagg backend. I guess I
have a problem with my installation of matplotlib, unless this is something that
changed after mpl-1.0. I will try mpl-svn next and see.
Regards,
Jorge
From: Daniel H. <dh...@gm...> - 2010年10月06日 04:39:46
I've run across a strange problem and perhaps I'm misusing something. I was
trying to set up picking so that I can interact with plotted objects, and I
get alot of error spew that looks like this:
while checking <class 'matplotlib.lines.Line2D'>
Traceback (most recent call last):
 File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 241, in
hitlist
 hascursor,info = self.contains(event)
 File "C:\Python26\lib\site-packages\matplotlib\lines.py", line 286, in
contains
 path, affine = self._transformed_path.get_transformed_path_and_affine()
AttributeError: 'NoneType' object has no attribute
'get_transformed_path_and_affine'
This can be reproduced by the following code, even though there is no
picking involved...just mouse motion. Is there possibly a workaround for
this, or am I doing something wrong?
import sys
from pylab import *
ax = subplot(111)
ax.plot([0,1,2,3])
def on_move(event):
 if event.inaxes:
 lst = ax.hitlist(event)
 print lst
binding_id = connect('motion_notify_event', on_move)
show()
-- 
Daniel Hyams
dh...@gm...
From: Jeff W. <js...@fa...> - 2010年10月06日 01:32:30
 On 10/5/10 7:14 PM, Bror Jonsson wrote:
>
> Dear all,
>
> I am trying to add a rectangle in a basemap map that reside in a 
> inlined axis.
> I am basing this exercise on the following code:
>
> (from 
> http://old.nabble.com/display-a-filled-lat-lon-basemap-rectangle.-td28169736.html)
>
> from matplotlib.patches import Polygon
> import matplotlib.pyplot as plt
> from mpl_toolkits.basemap import Basemap
> map = Basemap(projection='moll',lon_0=0)
> x1,y1 = map(-10,-10)
> x2,y2 = map(-10,10)
> x3,y3 = map(10,10)
> x4,y4 = map(10,-10)
> p = 
> Polygon([(x1,y1),(x2,y2),(x3,y3),(x4,y4)],facecolor='red',edgecolor='blue',linewidth=2)
>
> plt.gca().add_patch(p)
> map.drawcoastlines()
> map.drawmapboundary()
>
> I can change the last part to:
>
> ax1 = plt.subplot(111)
> ax1.add_patch(p)
> map.ax <http://map.ax> = ax1
> map.drawcoastlines()
> map.drawmapboundary()
>
> Which works fine. What I want is to create an extra axis for the map:
>
> ax1 = plt.subplot(111)
> ax2 = plt.axes([0.13,0.07,0.25,0.25])
> ax2.add_patch(p)
> map.ax <http://map.ax> = ax2
> map.drawcoastlines()
> map.drawmapboundary()
>
> The map is drawn correctly, but the patch doesn't show up. What am I 
> doing wrong?
Nothing, AFAICT. Works here with matplotlib 1.0.0 and basemap 1.0.
-Jeff
From: Bror J. <bro...@gm...> - 2010年10月06日 01:15:00
Dear all,
I am trying to add a rectangle in a basemap map that reside in a inlined
axis.
I am basing this exercise on the following code:
(from
http://old.nabble.com/display-a-filled-lat-lon-basemap-rectangle.-td28169736.html
)
from matplotlib.patches import Polygon
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
map = Basemap(projection='moll',lon_0=0)
x1,y1 = map(-10,-10)
x2,y2 = map(-10,10)
x3,y3 = map(10,10)
x4,y4 = map(10,-10)
p =
Polygon([(x1,y1),(x2,y2),(x3,y3),(x4,y4)],facecolor='red',edgecolor='blue',linewidth=2)
plt.gca().add_patch(p)
map.drawcoastlines()
map.drawmapboundary()
I can change the last part to:
ax1 = plt.subplot(111)
ax1.add_patch(p)
map.ax = ax1
map.drawcoastlines()
map.drawmapboundary()
Which works fine. What I want is to create an extra axis for the map:
ax1 = plt.subplot(111)
ax2 = plt.axes([0.13,0.07,0.25,0.25])
ax2.add_patch(p)
map.ax = ax2
map.drawcoastlines()
map.drawmapboundary()
The map is drawn correctly, but the patch doesn't show up. What am I doing
wrong?
Thanks for any help!!!
:-)Bror Jonsson
=============================================================
Post Doctoral Research Associate
Princeton University
Department of Geosciences
113 Guyot Hall
Princeton, NJ 08544-1003
USA
AIM, Skype, gTalk: brorfred
Phone: +1-617-818-1096
From: Eric F. <ef...@ha...> - 2010年10月06日 01:08:26
On 10/05/2010 01:00 PM, Jorge Scandaliaris wrote:
> Hi,
> Today I tried to run some code in my new notebook, but I only got blank figures
> and high CPU usage as a result. This code did run on my previous laptop. I can
> reproduce this behavior with the following code at the bottom of this message.
> The backtrace (also at the bottom this message) points to show() as the cause of
> the problem. The reason I have show() at the top is because in my code the call
> to plot() is done within a loop (I reuse the same figure for multiple plots). I
> still have to check all software versions in detail from the older laptop, but I
> wanted to ask here in case this was a known problem. I have ipython from git,
> and matplotlib 1.0, this is a 64 bit OS (Ubuntu 10.10). Matplotlib was installed
> from source. In the other laptop (Ubuntu 10.4, 32 bits) there's also ipython
> from git (although an older revision) and matplotlib 1.0 compiled from source.
>
> Regards,
>
> Jorge
For this to work, you need to be in matplotlib's interactive mode, 
either by running ipython with the -pylab option, or by calling 
plt.ion() before your call to show(). In either of these cases, your 
example code works for me with ipython from git, mpl from svn, and using 
drag/drop to enter the code in ipython. I am also on ubuntu 10.10, 
64-bit, with gtkagg backend.
Eric
>
>
> example code showing the problem
> ----8<-------------------------
> import numpy as np
> import matplotlib as mpl
> import matplotlib.pyplot as plt
>
> fig, ax = plt.subplots(1,1)
> plt.show()
> data = np.random.randn(10)
> ax.plot(data)
> fig.canvas.draw()
> ----8<-------------------------
>
> backtrace after hitting CTRL-C
> ----8<-------------------------
> In [2]: run doct/intrinsic-images/test_show.py
> ^C---------------------------------------------------------------------------
> KeyboardInterrupt Traceback (most recent call last)
> /home/jscandal/sw/python/doct/intrinsic-images/test_show.py in<module>()
> 5
> 6 fig, ax = plt.subplots(1,1)
> ----> 7 plt.show()
> 8 data = np.random.randn(10)
> 9 ax.plot(data)
>
> /home/jscandal/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.pyc
> in show(mainloop)
> 76 if mainloop and gtk.main_level() == 0 and \
> 77 len(Gcf.get_all_fig_managers())>0:
> ---> 78 gtk.main()
> 79
> 80 def new_figure_manager(num, *args, **kwargs):
>
> KeyboardInterrupt:
From: Michael L. <jer...@gm...> - 2010年10月06日 00:50:33
I'm making a plot with two y axes. When I resize the font on the tick
labels for the second axis, nothing happens. The same code however works
fine for the first set of axes. 
 fig = figure()
 ax1 = fig.add_subplot(111)
 plot(bias,gamma1,'k.',markersize=mrkrsize)
 ax1.set_ylim([0,10])
 ax1.set_yticks([0,5,10])
 ax1.set_yticklabels([0,5,10],fontsize=34) #Correctly sets tick label
font size
 ax2 = ax1.twinx()
 plot(bias,f,'k.',markersize=mrkrsize)
 ax2.set_yticks([0,-2,-4,-6])
 ax2.set_yticklabels([0,-2,-4,-6],fontsize=34) #Remains default size, no
error message
As far as I can tell this really should work, unless there is something
about twinx I don't understand. Any insight would be appreciated.
-- 
View this message in context: http://old.nabble.com/Problem-with-set_yticklabels-tp29892687p29892687.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
2 messages has been excluded from this view by a project administrator.

Showing 21 results of 21

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