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


Showing results of 60

<< < 1 2 3 > >> (Page 2 of 3)
From: asmwarrior <asm...@gm...> - 2014年07月24日 05:48:48
Hi, all.
I'm using matplotlib as a GDB pretty printer to visualize the data under Windows XP.
Is it possible to open a plot window which does not block the GDB's command line prompt?
I try to put the mainloop (show() function) in a separate thread, but this cause some GDB hanging issue if I try to show the plot window in the second time.
A minimal testing shows that a normal Tk window don't have this issue.
See my testing sample code in: http://stackoverflow.com/questions/24924357/non-blocking-pyplot-gui-for-gdb-python-pretty-printer
One of GDB developer Tom replied in the stackoverflow, he said that it is an issue related to SIGCHLD. I personally don't have a solution, so I'd ask for your help, thanks.
Asmwarrior(ollydbg)
From: Elena B. <e.b...@ep...> - 2014年07月23日 12:59:02
-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
From: Felipe B. <fel...@gm...> - 2014年07月21日 14:19:09
Hi Francisco,
after searching a little bit more I found a solution. I went to my home 
directory in:
~/.matplotlib
and renamed fontList.cache to fontList.cache.backup (it would be the same as 
if i deleted it, but I wanted a backup just if I had any other problems).
After that I tryed to run my script again and the Times New Roman font was 
working fine.
I've installed the package of true types fonts of microsoft too. In my ubuntu 
it was ttf-mscorefonts-installer. Don't know if this is really necessary.
Apparently, what I read about this problem relates this issue with some sort 
of problem in atualization of fontList.cache file
Best regards
From: Felipe B. <fel...@gm...> - 2014年07月21日 14:05:20
Hi Francisco, I got the same problem here. In my ubuntu 12.04 it was working 
fine. I recently installed Ubuntu 14.04 and got this problem. Trying to 
solve it too.
Best wishes
From: <cl...@br...> - 2014年07月18日 20:08:57
Dear Ben, 
Thanks for the hints. Yes, indeed I was able to print the tuple and loaded 
the LineCollection (from the basemap shapefile) through my code, a 
solution that stopped the error (set_label) described below: 
Here the tuple (river4, Observe the LineCollection is a2D object): 
(2569, 3, [33.953826960934919, -4.6502805036029002, 0.0, 0.0], 
[41.853908604641568, 4.6249956275413666, 0.0, 0.0], 
<matplotlib.collections.LineCollection object at 0x4b9a5d0>)
# tentatively add basemap to 3D 
m = 
Basemap(llcrnrlon=llclon,llcrnrlat=llclat,urcrnrlon=urclon,urcrnrlat=urclat, 
resolution ='l',area_thresh=1000.) 
river4 = 
m.readshapefile('../maps/KEN_water_lines_dcw','rivers4',drawbounds=True,color='SlateBlue', 
linewidth=1) 
# scan though shapefile collection 
for entry in river4: 
 if str(type(entry).__name__) == 'LineCollection': 
 lineCollection = entry 
ax.add_collection3d(lineCollection)
It even projects now the rivers over the 3D grid axes, but it did not 
merge it onto the surface plot, indeed it hided the surface plot drawing 
and now just displays the lines. 
Are there any further commands required to project the the LineCollection 
(rivers) over the plot_surface (terrain). Looks like a solution is close. 
Thanks in advance for any hint. 
Regards, 
Claude
Claude Falbriard 
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 13 9 9760 0453
cell: +55 13 9 8117 3316
e-mail: cl...@br...
From: Benjamin Root <ben...@ou...>
To: falbriard <cl...@br...>, 
Cc: Matplotlib Users <mat...@li...>
Date: 17/07/2014 10:49
Subject: Re: [Matplotlib-users] How to add a basemap to a 3D 
surface plot
Sent by: ben...@gm...
>From the docstring for readshapefile:
A tuple (num_shapes, type, min, max) containing shape file info
 is returned.
 num_shapes is the number of shapes, type is the type code (one of
 the SHPT* constants defined in the shapelib module, see
 http://shapelib.maptools.org/shp_api.html) and min and
 max are 4-element lists with the minimum and maximum values of the
 vertices. If ``drawbounds=True`` a
 matplotlib.patches.LineCollection object is appended to the tuple.
So, you are trying to add the tuple result rather than the line collection 
that you have. That said, because readshapefile draws to an axes anyway, 
it should already be adding the collection to the axes anyway. Try 
printing out the type of the last element of the returned tuple. It should 
say that it is a Line3DCollection type, because the Axes3D object should 
be converting collections upon being added internally.
I should also note that at this time, mplot3d only supports linear 
projections (I am currently working on a fix to support non-linear 
projections, but it is still limited to rectilinear coordinates). Also, I 
have never actually tried mashing together basemap and mplot3d, so if this 
works, let me know!
Cheers!
Ben Root
On Thu, Jul 17, 2014 at 8:22 AM, <cl...@br...> wrote:
Dear colleagues, 
Wonder if there is a solution for prejecting a basemap, in my task, its a 
river shapefile, onto a 3D surface plot using Matplotlib. 
I've tried to use the Axes3D.ax.add_collection3d(rivers) method but my 
test did throw an error message like this. 
# tentatively add basemap to 3D 
m = 
Basemap(llcrnrlon=llclon,llcrnrlat=llclat,urcrnrlon=urclon,urcrnrlat=urclat, 
resolution ='l',area_thresh=1000.) 
river4 = 
m.readshapefile('../maps/KEN_water_lines_dcw','rivers4',drawbounds=True,color='SlateBlue', 
linewidth=1) 
ax.add_collection3d(river4) 
Error thrown at the add_collection3d is: AttributeError: 'tuple' object 
has no attribute 'set_label'. 
Any hints or references to a similar example code are welcome. 
Regards, 
Claude 
Claude Falbriard 
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 13 9 9760 0453
cell: +55 13 9 8117 3316
e-mail: cl...@br...
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Benjamin R. <ben...@ou...> - 2014年07月17日 13:50:12
>From the docstring for readshapefile:
A tuple (num_shapes, type, min, max) containing shape file info
 is returned.
 num_shapes is the number of shapes, type is the type code (one of
 the SHPT* constants defined in the shapelib module, see
 http://shapelib.maptools.org/shp_api.html) and min and
 max are 4-element lists with the minimum and maximum values of the
 vertices. If ``drawbounds=True`` a
 matplotlib.patches.LineCollection object is appended to the tuple.
So, you are trying to add the tuple result rather than the line collection
that you have. That said, because readshapefile draws to an axes anyway, it
should already be adding the collection to the axes anyway. Try printing
out the type of the last element of the returned tuple. It should say that
it is a Line3DCollection type, because the Axes3D object should be
converting collections upon being added internally.
I should also note that at this time, mplot3d only supports linear
projections (I am currently working on a fix to support non-linear
projections, but it is still limited to rectilinear coordinates). Also, I
have never actually tried mashing together basemap and mplot3d, so if this
works, let me know!
Cheers!
Ben Root
On Thu, Jul 17, 2014 at 8:22 AM, <cl...@br...> wrote:
> Dear colleagues,
>
> Wonder if there is a solution for prejecting a basemap, in my task, its a
> river shapefile, onto a 3D surface plot using Matplotlib.
>
> I've tried to use the Axes3D.ax.add_collection3d(rivers) method but my
> test did throw an error message like this.
>
> # tentatively add basemap to 3D
> m =
> Basemap(llcrnrlon=llclon,llcrnrlat=llclat,urcrnrlon=urclon,urcrnrlat=urclat,
> resolution ='l',area_thresh=1000.)
> river4 =
> m.readshapefile('../maps/KEN_water_lines_dcw','rivers4',drawbounds=True,color='SlateBlue',
> linewidth=1)
> ax.add_collection3d(river4)
>
> Error thrown at the add_collection3d is: AttributeError: 'tuple' object
> has no attribute 'set_label'.
>
> Any hints or references to a similar example code are welcome.
>
> Regards,
> Claude
>
>
>
>
>
>
>
>
> * Claude Falbriard Certified IT Specialist L2 - Middleware AMS Hortolândia
> / SP - Brazil phone: +55 13 9 9760 0453 <%2B55%2013%209%209760%200453>
> cell: +55 13 9 8117 3316 <%2B55%2013%209%208117%203316> e-mail:
> cl...@br... <cl...@br...> *
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: <cl...@br...> - 2014年07月17日 12:54:05
Dear colleagues, 
Wonder if there is a solution for prejecting a basemap, in my task, its a 
river shapefile, onto a 3D surface plot using Matplotlib. 
I've tried to use the Axes3D.ax.add_collection3d(rivers) method but my 
test did throw an error message like this. 
# tentatively add basemap to 3D 
m = 
Basemap(llcrnrlon=llclon,llcrnrlat=llclat,urcrnrlon=urclon,urcrnrlat=urclat, 
resolution ='l',area_thresh=1000.)
river4 = 
m.readshapefile('../maps/KEN_water_lines_dcw','rivers4',drawbounds=True,color='SlateBlue', 
linewidth=1)
ax.add_collection3d(river4)
Error thrown at the add_collection3d is: AttributeError: 'tuple' object 
has no attribute 'set_label'. 
Any hints or references to a similar example code are welcome. 
Regards, 
Claude
Claude Falbriard 
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 13 9 9760 0453
cell: +55 13 9 8117 3316
e-mail: cl...@br...
From: Benjamin R. <ben...@ou...> - 2014年07月16日 15:07:05
Have you read through the transformation tutorial?
http://matplotlib.org/users/transforms_tutorial.html
There is a section on how to do a shadow transformation that might be
helpful. Obviously, you wouldn't need to create the second artist, but it
does show how to customize the transform on a per-artist basis.
Others might be able to provide better insight on whether or not there are
easier ways to do what you want.
Cheers!
Ben Root
On Wed, Jul 16, 2014 at 10:11 AM, Dr. Johannes Zellner <joh...@ze...
> wrote:
> Hi,
>
> I'd like to plot several objects which are defined in coordinate systems
> which are local to each object in a common plot.
> The objects (and the corresponding local coordinate systems) are rotated
> and translated wrt. a global reference point.
>
> I tried something like
>
> r = matplotlib.transforms.Affine2D().rotate_deg(90)
> matplotlib.pyplot.plot(x, y, transform = r)
>
> but this didn't work.
>
> Additionally to matplotlib.pyplot.plot I use also
> matplotlib.patches.PathPatch, matplotlib.pyplot.plot to draw shapes and
> text.
>
> Any help on how to rotate (and shift) a whole assembly which contains
> eg. a matplotlib.patches.PathPatch and an annotation would be helpful.
>
> regards,
>
> --
> Johannes
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Dr. J. Z. <joh...@ze...> - 2014年07月16日 14:12:03
Hi,
I'd like to plot several objects which are defined in coordinate systems 
which are local to each object in a common plot.
The objects (and the corresponding local coordinate systems) are rotated 
and translated wrt. a global reference point.
I tried something like
r = matplotlib.transforms.Affine2D().rotate_deg(90)
matplotlib.pyplot.plot(x, y, transform = r)
but this didn't work.
Additionally to matplotlib.pyplot.plot I use also 
matplotlib.patches.PathPatch, matplotlib.pyplot.plot to draw shapes and 
text.
Any help on how to rotate (and shift) a whole assembly which contains 
eg. a matplotlib.patches.PathPatch and an annotation would be helpful.
regards,
-- 
Johannes
From: Benjamin R. <ben...@ou...> - 2014年07月14日 16:15:41
How did you install or build matplotlib? It sounds like you built it from
source, and did not have any GUI dev tools installed. At the very minimum,
matplotlib will build only the non-interactive backends as they don't
require external dependencies (which would explain why you can save images,
but can't show them). Also, what is your OS?
Cheers!
Ben Root
On Sun, Jul 13, 2014 at 12:17 PM, Josè Luis Mietta <
jos...@ya...> wrote:
> Hi experts.
>
> I have two problems:
>
> 1) plt.show() doesnt work: When i draw simple plot doing
>
> import numpy as npimport matplotlib.pyplot as plt
> x = np.range(0, 5, 0.1);
> y = np.sin(x)
> plt.plot(x, y)
> plt.show()
>
> no picture appears.I try to do this: http://stackoverflow.com/questions/7534453/matplotlib-does-not-show-my-drawings-although-i-call-pyplot-show, but I cant save changes in the file matplotlibrc.
>
> But, If I do:
> import numpy as npimport matplotlib.pyplot as plt
> x = np.range(0, 5, 0.1);
> y = np.sin(x)
> plt.plot(x, y)
> plt.savefig('pppp.png')
>
> the picture is generated and saved.
>
> 2. When I try to draw a Graph (using NetworkX and Matplotlib) doing:
>
> import numpy as npimport matplotlib.pyplot as plt
> improt networkx as nx
> x = nx.Graph(M) #M is my matrix
> nx.draw(x)
> plt.savefig('jjj.png')
>
> I always get a pictule like the attached file. How can I restore my
> old-drawing style?
>
> Waiting for your answer.
>
> Thanks a lot!!
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Eric F. <ef...@ha...> - 2014年07月13日 21:32:24
On 2014年07月13日, 12:05 AM, Tommy Carstensen wrote:
> To matplotlib-users,
>
> When I do this on Linux:
> from mpl_toolkits.basemap import Basemap
>
> Then I get this error:
> ImportError: No module named 'mpl_toolkits'
Sounds like it might be a problem with the particular versions of 
matplotlib and basemap; there was a change in the way we handle 
namespace packages like mpl_toolkits.
>
> I also ran apt-get, but I still get the error:
> sudo apt-get install python-mpltoolkits.basemap
>
> What am I doing wrong? I also tried to get it to work on Mac with no luck.
Lots of possibilities, so without looking to see exactly what is on each 
system (Linux and Mac), it is impossible to say what the problem is.
For both systems, one easy solution is to use Anaconda. Basemap is not 
included in the basic installation, but can be added via "conda install 
basemap". Recommended.
Eric
>
> Thanks,
> Tommy
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Josè L. M. <jos...@ya...> - 2014年07月13日 16:34:53
Attachments: jjj.png
Hi experts.
I have two problems:
1) plt.show() doesnt work:  When i draw simple plot doing
importnumpy asnp importmatplotlib.pyplot asplt
x =np.range(0,5,0.1);y =np.sin(x)plt.plot(x,y)
plt.show()
no picture appears.I try to do this: http://stackoverflow.com/questions/7534453/matplotlib-does-not-show-my-drawings-although-i-call-pyplot-show, but I cant save changes in the file matplotlibrc.
But, If I do:
importnumpy asnp importmatplotlib.pyplot asplt
x =np.range(0,5,0.1);y =np.sin(x)plt.plot(x,y)
plt.savefig('pppp.png')
the picture is generated and saved.2. When I try to draw a Graph (using NetworkX and Matplotlib) doing:
importnumpy asnp importmatplotlib.pyplot asplt
improt networkx as nx
x =nx.Graph(M) #M is my matrix
nx.draw(x)
plt.savefig('jjj.png')
I always get a pictule like the attached file. How can I restore my old-drawing style?
Waiting for your answer.
Thanks a lot!!
To matplotlib-users,
When I do:
cd basemap-1.0.7/examples
python3 simpletest.py
Then I get this error message:
Traceback (most recent call last):
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/backends/backend_gtk3cairo.py",
line 32, in on_draw_event
 self._render_figure(w, h)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/backends/backend_gtk3cairo.py",
line 21, in _render_figure
 self.figure.draw (self._renderer)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/artist.py",
line 56, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/figure.py",
line 1035, in draw
 func(*args)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/artist.py",
line 56, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/axes.py",
line 2088, in draw
 a.draw(renderer)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/artist.py",
line 56, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/collections.py",
line 719, in draw
 return Collection.draw(self, renderer)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/artist.py",
line 56, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/collections.py",
line 279, in draw
 self._offset_position)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/backend_bases.py",
line 234, in draw_path_collection
 self.draw_path(gc0, path, transform, rgbFace)
 File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/backends/backend_cairo.py",
line 143, in draw_path
 raise ValueError("The Cairo backend can not draw paths longer than
18980 points.")
ValueError: The Cairo backend can not draw paths longer than 18980 points.
How can I get matplotlib basemap to work as expected?
Thanks,
Tommy
From: Francisco J H. <fra...@gm...> - 2014年07月13日 14:41:00
Dear all,
I am having big problems to produce an eps figure with Type 1 fonts
(Times New Roman) using matplotlib.
I try to follow what it is proposed here:
http://stackoverflow.com/questions/13132194/type-1-fonts-with-log-graphs
but I get errors:
/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-x86_64.egg/matplotlib/font_manager.py:1236:
UserWarning: findfont: Font family ['Times New Roman'] not found.
Falling back to Bitstream Vera Sans
 (prop.get_family(), self.defaultFamily[fontext]))
/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-x86_64.egg/matplotlib/font_manager.py:1246:
UserWarning: findfont: Could not match :family=Bitstream Vera
Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=14.0.
Returning /usr/share/matplotlib/mpl-data/fonts/ttf/STIXNonUniBol.ttf
 UserWarning)
It seems that Times New Roman, which is installed in my system, is not
accesible by matplotlib, as after doing:
>>> from matplotlib import font_manager
>>> font_manager.findfont('Times New Roman')
I get the same error as above.
Anyone has any idea? I am using Python 3.4.1 from Debian unstable and
Matplotlib1.3.1 compiled from source due to this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751692
Best wishes,
-- 
Francisco J. Hernández
From: Tommy C. <tom...@gm...> - 2014年07月13日 10:06:17
To matplotlib-users,
When I do this on Linux:
from mpl_toolkits.basemap import Basemap
Then I get this error:
ImportError: No module named 'mpl_toolkits'
I also ran apt-get, but I still get the error:
sudo apt-get install python-mpltoolkits.basemap
What am I doing wrong? I also tried to get it to work on Mac with no luck.
Thanks,
Tommy
From: Denis-Alexander E. <den...@gm...> - 2014年07月08日 15:17:47
... I meanwhile figured it out myself.
https://gist.github.com/dengemann/9081fc259ee5d03ffc6a
It wasn't clear to me that one needs to pass the transform of the axis
object.
Hope it will help someone else in the future.
Best,
Denis
On Tue, Jul 8, 2014 at 5:08 PM, Denis-Alexander Engemann <
den...@gm...> wrote:
> And to anticipate the question, I'm using a recent Anaconda for Mac OS X
> with matplotlib version 1.3.1.
>
>
> On Tue, Jul 8, 2014 at 4:55 PM, Denis-Alexander Engemann <
> den...@gm...> wrote:
>
>> Dear list,
>>
>> I'm having a very simple use case where I want to clip an image using
>> normalized xy coordinates.
>> Here 0, 0 would be the middle of the X and Y axes and the radius would be
>> 0.5.
>> For some reason reason the following code does not achieve what I want:
>>
>> https://gist.github.com/dengemann/9081fc259ee5d03ffc6a
>>
>> Instead of masking the area outside of the circle everything is masked.
>> It seems as if the clipping workflow would not accept normalized
>> positions but inches or pixels instead.
>> I've been looking for a unit parameter to set the coord system type or
>> something similar but I haven't been successful.
>>
>> Any hint would be highly appreciated.
>>
>> Best,
>> Denis
>>
>>
>
>
From: Denis-Alexander E. <den...@gm...> - 2014年07月08日 15:08:44
And to anticipate the question, I'm using a recent Anaconda for Mac OS X
with matplotlib version 1.3.1.
On Tue, Jul 8, 2014 at 4:55 PM, Denis-Alexander Engemann <
den...@gm...> wrote:
> Dear list,
>
> I'm having a very simple use case where I want to clip an image using
> normalized xy coordinates.
> Here 0, 0 would be the middle of the X and Y axes and the radius would be
> 0.5.
> For some reason reason the following code does not achieve what I want:
>
> https://gist.github.com/dengemann/9081fc259ee5d03ffc6a
>
> Instead of masking the area outside of the circle everything is masked.
> It seems as if the clipping workflow would not accept normalized positions
> but inches or pixels instead.
> I've been looking for a unit parameter to set the coord system type or
> something similar but I haven't been successful.
>
> Any hint would be highly appreciated.
>
> Best,
> Denis
>
>
From: Denis-Alexander E. <den...@gm...> - 2014年07月08日 14:55:39
Dear list,
I'm having a very simple use case where I want to clip an image using
normalized xy coordinates.
Here 0, 0 would be the middle of the X and Y axes and the radius would be
0.5.
For some reason reason the following code does not achieve what I want:
https://gist.github.com/dengemann/9081fc259ee5d03ffc6a
Instead of masking the area outside of the circle everything is masked.
It seems as if the clipping workflow would not accept normalized positions
but inches or pixels instead.
I've been looking for a unit parameter to set the coord system type or
something similar but I haven't been successful.
Any hint would be highly appreciated.
Best,
Denis
From: Oliver W. <oli...@gm...> - 2014年07月07日 08:08:38
Merely adding a link here from another user on the sphinx-users google-group
<https://groups.google.com/forum/#!msg/sphinx-users/VRqbiO-nEd0/mydrZlqhy1sJ> 
who came across the same problem 2 years ago. If the issue gets solved, I'll
know to update the other post as well.
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/plot-directive-cannot-have-caption-tp43608p43627.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Shahar Shani-K. <ka...@po...> - 2014年07月06日 10:52:30
Hi,
add linewidths=0 (or edgecolor='none', will do the same) to p = PatchCollection(patches, cmap=my_cmap)
note that PatchCollections can either get their properties from the original patch you create (the wedge) via the option *match_original* which defaults to false.
Shahar
On Jul 5, 2014, at 6:27 PM, Virgil Stokes <vs...@it...> wrote:
> I am using matplotlib version 1.3.1 with numpy 1.7.1 on a win32 platform for the 
> following code:
> 
> 
> import matplotlib
> import matplotlib.pyplot as plt
> from matplotlib.collections import PatchCollection
> import matplotlib.colors as col
> import matplotlib.cm as cm
> from matplotlib.patches import Wedge
> import numpy as np
> 
> 
> def register_cmap(cmapName):
> """
> Purpose: define colormap using the from_List() method as a
> segmented list and register it.
> """
> startcolor = '#00AF33' # truegreen
> midcolor = '#FFE600' # yolk (a medium dark yellow)
> endcolor = '#FF0033' # bright red
> cmap2 = col.LinearSegmentedColormap.from_list(cmapName,
> [startcolor,midcolor,endcolor])
> cm.register_cmap(cmap=cmap2)
> return cmap2
> 
> # Define my colormap red->yellow->green for curvature
> my_cmap = register_cmap('reylgr')
> 
> 
> # Modified matplotlib gallery example
> radii = np.arange(0.0,1.05,.05) # inner radius of rings
> width = 0.05 # width of rings
> patches = []
> for r in radii:
> wedge = Wedge((0.0,0.0), r+width, 0.0,360.0, width = width)
> patches.append(wedge)
> 
> fig = plt.figure()
> ax = fig.add_subplot(111)
> 
> colors = radii
> p = PatchCollection(patches, cmap=my_cmap)
> p.set_array(colors)
> ax.add_collection(p)
> ax.set_xlim(-1.5,+1.5)
> ax.set_ylim(-1.5,+1.5)
> plt.colorbar(p)
> 
> plt.show()
> 
> When I execute this code I do get concentric circles (wedge rings) as expected. 
> However,
> I do not want "edges" along the boundaries of the rings. I would like the color 
> changes
> between rings to look like the colorbar.
> 
> I have tried several options with Wedge (e.g. edgecolor = "none"); but, this had 
> no observable effect.
> 
> Help on this would be appreciated.
> 
> 
> 
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Virgil S. <vs...@it...> - 2014年07月05日 15:27:49
I am using matplotlib version 1.3.1 with numpy 1.7.1 on a win32 platform for the 
following code:
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
import matplotlib.colors as col
import matplotlib.cm as cm
from matplotlib.patches import Wedge
import numpy as np
def register_cmap(cmapName):
 """
 Purpose: define colormap using the from_List() method as a
 segmented list and register it.
 """
 startcolor = '#00AF33' # truegreen
 midcolor = '#FFE600' # yolk (a medium dark yellow)
 endcolor = '#FF0033' # bright red
 cmap2 = col.LinearSegmentedColormap.from_list(cmapName,
[startcolor,midcolor,endcolor])
 cm.register_cmap(cmap=cmap2)
 return cmap2
# Define my colormap red->yellow->green for curvature
my_cmap = register_cmap('reylgr')
# Modified matplotlib gallery example
radii = np.arange(0.0,1.05,.05) # inner radius of rings
width = 0.05 # width of rings
patches = []
for r in radii:
 wedge = Wedge((0.0,0.0), r+width, 0.0,360.0, width = width)
 patches.append(wedge)
fig = plt.figure()
ax = fig.add_subplot(111)
colors = radii
p = PatchCollection(patches, cmap=my_cmap)
p.set_array(colors)
ax.add_collection(p)
ax.set_xlim(-1.5,+1.5)
ax.set_ylim(-1.5,+1.5)
plt.colorbar(p)
plt.show()
When I execute this code I do get concentric circles (wedge rings) as expected. 
However,
I do not want "edges" along the boundaries of the rings. I would like the color 
changes
between rings to look like the colorbar.
I have tried several options with Wedge (e.g. edgecolor = "none"); but, this had 
no observable effect.
Help on this would be appreciated.
From: jw <gw...@ou...> - 2014年07月05日 01:48:18
Thanks for pointing it to a packaging issue, as matplotlib works very well
after installing the missing packages.
I don't know really the the issue, but I hope it gets sorted out. The
earlier binaries had everything it needed on windows, so very convenient to
users. I think problems like this could really discourage new users to try,
particularly the inexperienced.
In my case, the matplotlib install was a clean install on a new machine,
though I had used it often on other computers. It was installed after Python
2.7.8, numpy, scipy, and Vpython, so the problem had to be packaging rather
than transitional, it'd would seem.
One possibility is that with v1.3, we changed how packaging was done.
Unfortunately, this did cause some transitional issues. The best bet is to
uninstall *all* versions of matplotlib, pylab, and mpl_toolkits first, then
re-install v1.3.1. Note that waiting for the v1.4 release wouldn't
necessarily solve anything as it is the transition *from* older versions of
matplotlib that is the issue rather than transitioning *to* newer versions.
Hopefully this helps,
Ben Root
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/installation-problem-tp43325p43620.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Benjamin R. <ben...@ou...> - 2014年07月04日 19:01:52
I presume you mean pypi said that the latest version was 1.0.1? PyPi
recently (and rightly so) stopped automatically pull eggs from third-party
locations (this is a *huge* security risk). Version 1.0.1 was the last
version that was directly hosted on PyPi because the test suite made the
package so much bigger after that version.
There was talk about granting "top-tier" projects like matplotlib and
basemap special permission to upload larger eggs to PyPi. I don't know if
that has happened yet.
Cheers!
Ben Root
On Fri, Jul 4, 2014 at 2:48 PM, Rachana Katkam <kat...@gm...>
wrote:
> I faced the problem of upgrading my matplotlib to 1.3.1 having my
> python2.7. Its on Fedora am talking about. Its the dmg file available here
> http://matplotlib.org/downloads.html
> When I checked for upgrading from Terminal, it said matplotlib1.0.1 is the
> latest version.
>
>
> On Fri, Jul 4, 2014 at 10:52 PM, Goyo <goy...@gm...> wrote:
>
>> 2014年07月04日 8:30 GMT+02:00 Rachana Katkam <kat...@gm...>:
>> > Hey, even I had similar issue.
>> > Later I learnt python2.7 could support matplotlib version1.0.1 only.
>> >
>> > So if you want to upgrade your matplotlib, you first need to upgrade
>> your
>> > python.
>>
>> matplotlib 1.3.1 works quite well with python 2.7.
>>
>> Goyo
>>
>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Rachana K. <kat...@gm...> - 2014年07月04日 18:48:40
I faced the problem of upgrading my matplotlib to 1.3.1 having my
python2.7. Its on Fedora am talking about. Its the dmg file available here
http://matplotlib.org/downloads.html
When I checked for upgrading from Terminal, it said matplotlib1.0.1 is the
latest version.
On Fri, Jul 4, 2014 at 10:52 PM, Goyo <goy...@gm...> wrote:
> 2014年07月04日 8:30 GMT+02:00 Rachana Katkam <kat...@gm...>:
> > Hey, even I had similar issue.
> > Later I learnt python2.7 could support matplotlib version1.0.1 only.
> >
> > So if you want to upgrade your matplotlib, you first need to upgrade your
> > python.
>
> matplotlib 1.3.1 works quite well with python 2.7.
>
> Goyo
>
From: Benjamin R. <ben...@ou...> - 2014年07月04日 18:48:10
Perhaps Anaconda would be best for an easy to install environment and much
of the commonly used scientific computing tools?
http://continuum.io/downloads
As for PyNIO, due to licensing issues, it isn't installable through pip or
easy_install. If you go to their website and create a free account, you can
get an installer that would work fine out of the box, but I have never
tried to install PyNIO in an Anaconda environment.
https://www.pyngl.ucar.edu/Download/install_from_binary.shtml
As for "reading" IDL from python, no such thing exists AFAIK. I have come
across this tool: https://code.google.com/p/i2py/. I have never used it
(luckily), so I can't vouch for its usefulness. The goal of i2py is not to
be a one-to-one converter of IDL code into python, but rather to be an
assistant when migrating an IDL codebase into Python. The human still has
to go over the resulting code and make it valid. The most important thing
for the code migration is to start with unit tests in IDL, and then have
identical unit tests in python. This helps to make sure all of the code is
doing exactly what you expect them to do before and after code migration.
Best of luck to you!
Ben Root
On Fri, Jul 4, 2014 at 11:42 AM, <jos...@gm...> wrote:
>
>
> On Fri, Jul 4, 2014 at 10:07 AM, Dino Bektešević <lj...@gm...>
> wrote:
>
>> Hello dydy,
>>
>> If you've never done programing in python I would recommend a book
>> "dive into python" any version will do but the latest one is 3 I
>> think. Asking this questions in tut...@py... will probably
>> get you even further since they mainly deal with general python
>> learning.
>>
>> Whatever you can use through command prompt you can use in python if
>> you use import subprocess. Subprocess.call("command") calls whatever
>> command you want over the command line. If you can call IDL to run
>> files over command line this can be an option. If not you're going to
>> have to use a wrapper tool like SWIG is foc c/c++ or another module to
>> connect to IDL. A useful module here will usually be os as well.
>>
>> As for installations of modules under windows platforms, that's always
>> tricky, I recommend using a virtualenv with pip, because then
>> generally installing a module boils down to using "pip install". But
>> even in virtualenv on windows I've had issues with installing i.e.
>> matplotlib and found it impossible and I've had to install it
>> system-wide by using one of the unofficial binary installers from:
>> http://www.lfd.uci.edu/~gohlke/pythonlibs/ and from then I have to
>> start start each virtualenv with the option --system-site-packages
>> which kind of defeats the purpose of a virtualenv, but such is the
>> nature of developing on win's....
>> (I've read that you can activate local modules by hand, but I've not
>> been able to reproduce it)
>>
>
> I never recommend pip to Windows users (at least not until everything is
> in wheels).
>
> The last few times I had no problem `easy_install`ing the matplotlib exe
> installer in a virtualenv, nor any of the other exe installers.
>
> (pip is for Linux users, I never found anything better than easy_install
> on Windows.)
>
> Josef
>
>
>
>>
>>
>> I know this is a bunch of new info, I suggest you read up on it, best of
>> luck,
>> Dino
>>
>> 2014年07月04日 3:05 GMT+02:00 dydy2014 <dya...@gm...>:
>> > Hello all,
>> >
>> > I interested in python programming that is why I join in this forum.
>> > I want to know how to install new module in my python program?. I use
>> python
>> > under windows OS.
>> > Actually, I interest with PyNio but I don't know how to install it.
>> > Another question is how to make other language, for example, IDL, can be
>> > read in python?
>> > Thank you....
>> >
>> > Dydy
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://matplotlib.1069221.n5.nabble.com/PyNio-tp43610.html
>> > Sent from the matplotlib - users mailing list archive at Nabble.com.
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Open source business process management suite built on Java and Eclipse
>> > Turn processes into business applications with Bonita BPM Community
>> Edition
>> > Quickly connect people, data, and systems into organized workflows
>> > Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> > http://p.sf.net/sfu/Bonitasoft
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>> ------------------------------------------------------------------------------
>> Open source business process management suite built on Java and Eclipse
>> Turn processes into business applications with Bonita BPM Community
>> Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

Showing results of 60

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