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


Showing 10 results of 10

From: Benjamin R. <ben...@ou...> - 2013年01月22日 21:20:39
On Tue, Jan 22, 2013 at 1:57 PM, David Erickson <hal...@gm...>wrote:
> Hello-
> Prior to version 1.2 of MPL I was able to hide labels for certain
> lines in the legend by setting the label=None when plotting a line,
> however in 1.2 it is now showing the legend entry and visibly printing
> "None". Is there a workaround to hide the label?
>
> Thanks,
> David
>
>
I think you want "_nolegend_" for those labels. The hiding of the labels
for None was an undocumented feature, I think, and has been "fixed".
http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.legend
Cheers!
Ben Root
From: Jonathan S. <js...@cf...> - 2013年01月22日 21:10:43
Hi Paul,
This doesn't solve my problem since the whole point was to have two
separate x axes with different scales, etc. One thing that I found that
does help is to use the suptitle() method of figure. This at least puts
the title at the top of the figure and I can then fiddle with the top
offset for the subplot to get the title to not overlap the axis label.
Jon
On Tue, 2013年01月22日 at 13:02 -0800, Paul Hobson wrote:
> 
> On Tue, Jan 22, 2013 at 12:22 PM, Jonathan Slavin
> <js...@cf...> wrote:
> Hi,
> 
> I'm having some trouble with using twiny and a title on the
> plot. The
> title is writing over the axis label -- and even the tick
> labels. I've
> tried tight_layout() but it doesn't seem to help. I could use
> fig.text
> instead of title and place the title text where I want it
> (with a bit of
> fiddling), but it'd be nice to have a more elegant solution.
> 
> 
> Try this is a workaround:
> fig, ax1 = plt.subplots()
> ax2 = ax1.twiny()
> ax1.plot(np.random.randn(50), 'gs')
> ax2.plot(np.random.randn(50), 'bo')
> ax1.set_title('Test Title')
> ax2.xaxis.tick_bottom()
> plt.show()
> 
> Does that help?
> -paul
> 
> 
-- 
______________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
js...@cf... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
 cell: (781) 363-0035 USA
______________________________________________________________
From: Paul H. <pmh...@gm...> - 2013年01月22日 21:02:12
On Tue, Jan 22, 2013 at 12:22 PM, Jonathan Slavin
<js...@cf...>wrote:
> Hi,
>
> I'm having some trouble with using twiny and a title on the plot. The
> title is writing over the axis label -- and even the tick labels. I've
> tried tight_layout() but it doesn't seem to help. I could use fig.text
> instead of title and place the title text where I want it (with a bit of
> fiddling), but it'd be nice to have a more elegant solution.
>
Try this is a workaround:
fig, ax1 = plt.subplots()
ax2 = ax1.twiny()
ax1.plot(np.random.randn(50), 'gs')
ax2.plot(np.random.randn(50), 'bo')
ax1.set_title('Test Title')
ax2.xaxis.tick_bottom()
plt.show()
Does that help?
-paul
From: Jonathan S. <js...@cf...> - 2013年01月22日 20:23:04
Hi,
I'm having some trouble with using twiny and a title on the plot. The
title is writing over the axis label -- and even the tick labels. I've
tried tight_layout() but it doesn't seem to help. I could use fig.text
instead of title and place the title text where I want it (with a bit of
fiddling), but it'd be nice to have a more elegant solution.
Jon
-- 
______________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
js...@cf... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
 cell: (781) 363-0035 USA
______________________________________________________________
From: David E. <hal...@gm...> - 2013年01月22日 18:57:16
Hello-
Prior to version 1.2 of MPL I was able to hide labels for certain
lines in the legend by setting the label=None when plotting a line,
however in 1.2 it is now showing the legend entry and visibly printing
"None". Is there a workaround to hide the label?
Thanks,
David
From: Benjamin R. <ben...@ou...> - 2013年01月22日 14:29:48
On Mon, Jan 21, 2013 at 8:06 PM, Pau <vim...@go...> wrote:
> Hi,
>
> I am somehow new to matplotlib and I am trying to plot this function of x
> ,y ,z
>
> F(x,y,z)=
> 38244.74787*Pi*(x^2+y^2+z^2)^.125+1615.975261*Pi*z^2/(x^2+y^2+z^2)^.875-1292.780210*Pi*z^2/((x^2+y^2+z^2)^.875*(1+y^2/x^2))+1292.78*Pi*(x^2+y^2+z^2)^.125/(1+y^2/x^2)
>
> in a similar way as
>
> http://matplotlib.org/mpl_examples/mplot3d/contour3d_demo3.hires.png
>
> The code is
> http://matplotlib.org/mpl_examples/mplot3d/contour3d_demo3.py
>
> But I have no idea where to start...
>
> some help would be appreciated...
>
> thanks
>
>
The reason you are having difficulty coming up with a way to plot this is
because you have 3 input dimensions, and 1 output dimension that you wish
to plot. If you were to plot this in 3D space, it would have to be done as
F(x,y,z) as a colored "mist" in the domain of (x,y,z). While a "mist"
can't be done in mplot3d, you could plot out scatter points to emulate
this. One could also use contourf3d(..., zdir='z', offset=...) to create
slices of the filled contours, similar to this example:
http://matplotlib.org/examples/mplot3d/contourf3d_demo2.html
Now, if the domain of (x,y,z) can be parameterized as a surface (i.e., a
sphere or a cylinder), then you are looking to do an image of F(x,y,z)
plotted on that surface, which is a little bit difficult, but also do-able
using the plot_surface() function.
Cheers!
Ben Root
From: Massimiliano C. <mas...@ms...> - 2013年01月22日 13:33:20
Hello everyone,
in my program I'm encountering an error when calling the function axes.set_xticks (Matplotlib 1.2.0 on python 2.7-64 bit). It is really difficult for me to build a test case, because my program is really complex. Here is the error traceback:
File "C:\Python27\Lib\site-packages\matplotlib\axes.py", line 2596, in set_xticks
 return self.xaxis.set_ticks(ticks, minor=minor)
File "C:\Python27\Lib\site-packages\matplotlib\axis.py", line 1489, in set_ticks
 self.set_view_interval(min(ticks), max(ticks))
File "C:\Python27\Lib\site-packages\matplotlib\axis.py", line 1771, in set_view_interval
 max(vmin, vmax, Vmax))
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 932, in _set_intervalx
 self.invalidate()
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 131, in invalidate
 return self._invalidate_internal(value, invalidating_node=self)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 155, in _invalidate_internal
 invalidating_node=self)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 155, in _invalidate_internal
 invalidating_node=self)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 155, in _invalidate_internal
 invalidating_node=self)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 2141, in _invalidate_internal
 invalidating_node=invalidating_node)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 155, in _invalidate_internal
 invalidating_node=self)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 2141, in _invalidate_internal
 invalidating_node=invalidating_node)
File "C:\Python27\Lib\site-packages\matplotlib\transforms.py", line 153, in _invalidate_internal
 for parent in self._parents.itervalues():
File "C:\Python27\Lib\weakref.py", line 147, in itervalues
 for wr in self.data.itervalues(): 
RuntimeError: dictionary changed size during iteration
I googled and found that this is a well known bug due to the use of self.data.itervalues() in the for loop (i think the correct syntax should be for wr in iter(self.data.items()). So I would like to point out the bug (if it is) to the matplotlib guys, how can I do it?
In the meantime, how can I work around it without changing the source code?
Thanks in advance!
 		 	 		 
From: <jos...@gm...> - 2013年01月22日 03:54:13
On Mon, Jan 21, 2013 at 10:12 PM, <jos...@gm...> wrote:
> On Mon, Jan 21, 2013 at 5:01 AM, cnorn <ch...@gm...> wrote:
>> Are there any way to make column scatter plots with matplotlib. They are also
>> called beeswarm plot. plotSpread is implemented in matlab, which seems to do
>> the job, but I can't find it in matplotlib.
>
>
> somewhat similar, with random jitter and violins
>
> http://statsmodels.sourceforge.net/devel/generated/statsmodels.graphics.boxplots.beanplot.html
> https://picasaweb.google.com/lh/photo/SF2eFYvMcgEknynXlSYEG9MTjNZETYmyPJy0liipFm0?feat=directlink
turning off some colors (full set of options are available):
https://picasaweb.google.com/lh/photo/41edXo0ZeO6qUreNeUvJmdMTjNZETYmyPJy0liipFm0?feat=directlink
>
> plotSpread looks like it might have a fancier point selection
If someone can come up with more regular "bees" like here
http://stackoverflow.com/questions/9777592/beeswarm-boxplot-scatterplot-for-categorical-data-in-matlab
then it would make a nice enhancement.
Josef
>
> Josef
>
>>
>> Thanks,
>> Chris
>>
>>
>>
>>
>> --
>> View this message in context: http://matplotlib.1069221.n5.nabble.com/How-to-make-column-scatter-plots-tp40276.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. SALE 99ドル.99 this month only -- learn more at:
>> http://p.sf.net/sfu/learnmore_122412
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: <jos...@gm...> - 2013年01月22日 03:12:36
On Mon, Jan 21, 2013 at 5:01 AM, cnorn <ch...@gm...> wrote:
> Are there any way to make column scatter plots with matplotlib. They are also
> called beeswarm plot. plotSpread is implemented in matlab, which seems to do
> the job, but I can't find it in matplotlib.
somewhat similar, with random jitter and violins
http://statsmodels.sourceforge.net/devel/generated/statsmodels.graphics.boxplots.beanplot.html
https://picasaweb.google.com/lh/photo/SF2eFYvMcgEknynXlSYEG9MTjNZETYmyPJy0liipFm0?feat=directlink
plotSpread looks like it might have a fancier point selection
Josef
>
> Thanks,
> Chris
>
>
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/How-to-make-column-scatter-plots-tp40276.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE 99ドル.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Pau <vim...@go...> - 2013年01月22日 02:11:07
Hi,
I am somehow new to matplotlib and I am trying to plot this function of x ,y ,z
F(x,y,z)= 38244.74787*Pi*(x^2+y^2+z^2)^.125+1615.975261*Pi*z^2/(x^2+y^2+z^2)^.875-1292.780210*Pi*z^2/((x^2+y^2+z^2)^.875*(1+y^2/x^2))+1292.78*Pi*(x^2+y^2+z^2)^.125/(1+y^2/x^2)
in a similar way as
http://matplotlib.org/mpl_examples/mplot3d/contour3d_demo3.hires.png
The code is
http://matplotlib.org/mpl_examples/mplot3d/contour3d_demo3.py
But I have no idea where to start...
some help would be appreciated...
thanks

Showing 10 results of 10

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