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


Showing results of 136

1 2 3 .. 6 > >> (Page 1 of 6)
From: Michael D. <md...@st...> - 2013年10月31日 20:32:29
Github seems to be having trouble updating the website at the moment. 
The direct links to the installer files are:
https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1-py2.7-python.org-macosx10.6.dmg
https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1-py3.3-python.org-macosx10.6.dmg
Mike
On 10/31/2013 04:18 PM, Michael Droettboom wrote:
> Courtesy of Matthew Brett, we now have Mac OS X installers again. 
> These are designed to work with the python.org distribution, and 
> include all dependencies.
>
> They are available here:
>
> http://matplotlib.org/downloads
>
> Please let us know how you fare!
>
> Mike
> -- 
> _
> |\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
> | ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
>
> http://www.droettboom.com
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
 _
|\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
| ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
http://www.droettboom.com
From: Michael D. <md...@st...> - 2013年10月31日 20:20:50
Courtesy of Matthew Brett, we now have Mac OS X installers again. These 
are designed to work with the python.org distribution, and include all 
dependencies.
They are available here:
http://matplotlib.org/downloads
Please let us know how you fare!
Mike
-- 
 _
|\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
| ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
http://www.droettboom.com
From: Benjamin R. <ben...@ou...> - 2013年10月31日 14:10:26
On Thu, Oct 31, 2013 at 9:43 AM, Guido Avvisati <gui...@gm...>wrote:
> Benjamin Root <ben.root@...> writes:
>
> >
> >
> > On Tue, Nov 20, 2012 at 8:12 PM, Stephen Gibson <Stephen.Gibson-
> FCV...@pu...> wrote:
> >
> > Ok. Adding an NaN as the last data point did not help.
> > However, I notice that the return path is two segments that go through
> (0,0).
> > i.e. the baseline (or return) path may actually start/finish at (0,0)
> > The attached image shows my data offset in y-direction by +1. The end
> points
> > have been set to y=0.5. The baseline (or return path) is the line
> segment
> that
> > starts at the first data point, passes through (x=0,y=0), and ends at the
> last
> > data point.
> > Steve.
> >
> >
> > Actually, this might be related to a bug that was pointed out to me a
> while back that I just could not figure out. Having this example might
> help
> in narrowing down the cause. Essentially, the (0,0) vertex was being added
> even when it shouldn't have been. The key difference in this example is
> that zdir='y' is used, which causes the (0,0) vertex to refer to the x,z
> coordinate. Interesting...I will have to investigate further.Ben Root
> >
> >
> >
> >
> >
> --------------------------------------------------------------------------
> ----
> > Monitor your physical, virtual and cloud infrastructure from a single
> > web console. Get in-depth insight into apps, servers, databases, vmware,
> > SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> > Pricing starts from 795ドル for 25 servers or applications!
> > http://p.sf.net/sfu/zoho_dev2dev_nov
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Matplotlib-users@...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
> Hi,
>
> I have exactly the same problem described here. Is there any solution to
> turn off the baseline in the polycollection?
>
> Cheers,
> Guido
>
>
>
There was a pull request that was put together about 6 months ago that I
think fixed the problem, IIRC, but it broke the API and the submitter
eventually retracted the PR because it didn't seem like the right solution.
The problem is extremely nuanced and there is no clear solution,
unfortunately. The general idea is that the path codes are not being stored
with the vertices because the underlying object holding that data is a Path
(so the 3D vertices are stored separately, and as such, the list of
vertices diverges from the list of path codes). Perhaps, if there was a way
to make Path objects be able to hold 3D vertices, we might be able to solve
this issue once and for all?
Ben Root
From: Guido A. <gui...@gm...> - 2013年10月31日 13:45:15
Benjamin Root <ben.root@...> writes:
> 
> 
> On Tue, Nov 20, 2012 at 8:12 PM, Stephen Gibson <Stephen.Gibson-
FCV...@pu...> wrote:
> 
> Ok. Adding an NaN as the last data point did not help.
> However, I notice that the return path is two segments that go through 
(0,0).
> i.e. the baseline (or return) path may actually start/finish at (0,0)
> The attached image shows my data offset in y-direction by +1. The end 
points
> have been set to y=0.5. The baseline (or return path) is the line segment 
that
> starts at the first data point, passes through (x=0,y=0), and ends at the 
last
> data point.
> Steve.
> 
> 
> Actually, this might be related to a bug that was pointed out to me a 
while back that I just could not figure out. Having this example might help 
in narrowing down the cause. Essentially, the (0,0) vertex was being added 
even when it shouldn't have been. The key difference in this example is 
that zdir='y' is used, which causes the (0,0) vertex to refer to the x,z 
coordinate. Interesting...I will have to investigate further.Ben Root
> 
> 
> 
> 
> --------------------------------------------------------------------------
----
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from 795ドル for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> 
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
Hi,
I have exactly the same problem described here. Is there any solution to 
turn off the baseline in the polycollection?
Cheers,
Guido
From: Nils W. <ni...@go...> - 2013年10月31日 13:00:09
Hi Joe,
Just now I installed your package mpldatacursor and run the example
image_example.py.
Awesome !
Is there a chance to integrate it into matplotlib ?
Nils
On Wed, Oct 30, 2013 at 5:58 PM, Joe Kington <jof...@gm...> wrote:
>
> On Oct 30, 2013 9:43 AM, "Nils Wagner" <ni...@go...> wrote:
> >
> > Hi all,
> >
> > How can I retrieve the corresponding "color value" in percent, when I
> click on the image ?
> >
>
> You have to jump through a couple of hoops.
>
> Have a look at the _coords2index function in pick_info.py for
> mpldatacursor.
> https://github.com/joferkington/mpldatacursor/blob/master/mpldatacursor/pick_info.py
>
> Also, mpldatacursor might be useful for what you're doing. Not to plug my
> own project too much, but it does exactly this, among other things.
>
> Hope that helps!
> -Joe
>
> > fig = plt.figure()
> > ax = fig.add_subplot(111)
> > cax = ax.imshow(col[:,::2],
> interpolation='nearest',extent=[0.5,20.5,0.5,2
> > 0.5],alpha=1,picker=5)
> >
> > fig.canvas.mpl_connect('pick_event', onpick)
> >
> > def onpick(event):
> > ...
> >
> >
> > Nils
> >
> >
> >
> ------------------------------------------------------------------------------
> > Android is increasing in popularity, but the open development platform
> that
> > developers love is also attractive to malware creators. Download this
> white
> > paper to learn more about secure code signing practices that can help
> keep
> > Android apps secure.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
From: Joe K. <jof...@gm...> - 2013年10月30日 16:58:53
On Oct 30, 2013 9:43 AM, "Nils Wagner" <ni...@go...> wrote:
>
> Hi all,
>
> How can I retrieve the corresponding "color value" in percent, when I
click on the image ?
>
You have to jump through a couple of hoops.
Have a look at the _coords2index function in pick_info.py for
mpldatacursor.
https://github.com/joferkington/mpldatacursor/blob/master/mpldatacursor/pick_info.py
Also, mpldatacursor might be useful for what you're doing. Not to plug my
own project too much, but it does exactly this, among other things.
Hope that helps!
-Joe
> fig = plt.figure()
> ax = fig.add_subplot(111)
> cax = ax.imshow(col[:,::2], interpolation='nearest',extent=[0.5,20.5,0.5,2
> 0.5],alpha=1,picker=5)
>
> fig.canvas.mpl_connect('pick_event', onpick)
>
> def onpick(event):
> ...
>
>
> Nils
>
>
>
------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform
that
> developers love is also attractive to malware creators. Download this
white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
>
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Benjamin R. <ben...@ou...> - 2013年10月30日 16:52:36
Good point. The underlying mechanism for recording the changes to the
limits assume just x and y limits, and wouldn't record the z limits.
Furthermore, it certainly doesn't take into account any changes with
respect to the viewing angle. I am not familiar enough with the mechanisms
to figure out how to make that work here, but feel free to file a feature
request. But, let's be honest here, I have *zero* time in the foreseeable
future to handle even the bug requests, let alone feature requests for
mplot3d. Perhaps it is time to find someone else who is willing to pick up
the mantle here?
From: Sterling S. <sm...@fu...> - 2013年10月30日 16:29:50
On Oct 30, 2013, at 7:47AM, Scott Lasley wrote:
> 
> On Oct 30, 2013, at 10:14, Neal Becker <ndb...@gm...> wrote:
> 
>> I have a blue line plot and a green line plot. I'd like to add some figtext at 
>> the bottom, and I'd like the text colors to match the plot colors. So I'd have 
>> some text in blue and some in green.
>> 
>> figtext only allows one color
>> 
>> I could use 2 figtext, but then I have to manually find coordinate positions for 
>> the text. That's ugly.
>> 
>> It would be nice if we had a TeX-like approach, where I could create a green 
>> text object and a blue text object, then assemble them by stacking boxes.
>> 
>> Any ideas?
> 
> I'm not sure it's the best approach, but I've used HPacker (or VPacker if you want more than one line) to do this
I have taken this approach as well. See part of my answer at http://stackoverflow.com/questions/17086847/box-around-text-in-matplotlib/17092777#17092777
From: Scott L. <sl...@sp...> - 2013年10月30日 15:03:10
On Oct 30, 2013, at 10:14, Neal Becker <ndb...@gm...> wrote:
> I have a blue line plot and a green line plot. I'd like to add some figtext at 
> the bottom, and I'd like the text colors to match the plot colors. So I'd have 
> some text in blue and some in green.
> 
> figtext only allows one color
> 
> I could use 2 figtext, but then I have to manually find coordinate positions for 
> the text. That's ugly.
> 
> It would be nice if we had a TeX-like approach, where I could create a green 
> text object and a blue text object, then assemble them by stacking boxes.
> 
> Any ideas?
I'm not sure it's the best approach, but I've used HPacker (or VPacker if you want more than one line) to do this
from matplotlib.offsetbox import HPacker
from matplotlib.offsetbox import VPacker
from matplotlib.offsetbox import TextArea
from matplotlib.offsetbox import AnchoredOffsetbox
plot([1,2,3,4,5])
wloc = TextArea('WIND XYZ=()', textprops=dict(color="r", size=12))
sloc = TextArea('SOHO XYZ=()', textprops=dict(color="k", size=18))
txt1 = HPacker(children=[wloc, sloc], align="baseline", pad=0, sep=12)
txt2 = VPacker(children=[wloc, sloc], align="baseline", pad=0, sep=30)
bbox = AnchoredOffsetbox(loc=1.0, pad=0, borderpad=0,
 bbox_to_anchor=(0.8, 0.10),
 bbox_transform=gca().transAxes,
 child=txt1,
 frameon=False)
gca().add_artist(bbox)
bbox = AnchoredOffsetbox(loc=1.0, pad=0, borderpad=0,
 bbox_to_anchor=(0.4, 0.80),
 bbox_transform=gca().transAxes,
 child=txt2,
 frameon=False)
gca().add_artist(bbox)
From: Nils W. <ni...@go...> - 2013年10月30日 14:42:05
Attachments: image.png
Hi all,
How can I retrieve the corresponding "color value" in percent, when I click
on the image ?
fig = plt.figure()
ax = fig.add_subplot(111)
cax = ax.imshow(col[:,::2], interpolation='nearest',extent=[0.5,20.5,0.5,2
0.5],alpha=1,picker=5)
fig.canvas.mpl_connect('pick_event', onpick)
def onpick(event):
 ...
Nils
From: Paul I. <pi...@be...> - 2013年10月30日 14:32:24
Hi Neal,
Neal Becker, on 2013年10月30日 10:14, wrote:
> I have a blue line plot and a green line plot. I'd like to add some figtext at 
> the bottom, and I'd like the text colors to match the plot colors. So I'd have 
> some text in blue and some in green.
> 
> figtext only allows one color
> 
> I could use 2 figtext, but then I have to manually find coordinate positions for 
> the text. That's ugly.
> 
> It would be nice if we had a TeX-like approach, where I could create a green 
> text object and a blue text object, then assemble them by stacking boxes.
You should be able to follow the approach I've taken here in
stacking the text bounding boxes together:
 https://github.com/matplotlib/matplotlib/issues/697
best,
-- 
 _
 / \
 A* \^ -
 ,./ _.`\\ / \
 / ,--.S \/ \
 / `"~,_ \ \
 __o ?
 _ \<,_ /:\
--(_)/-(_)----.../ | \
--------------.......J
Paul Ivanov
http://pirsquared.org
From: Neal B. <ndb...@gm...> - 2013年10月30日 14:14:36
I have a blue line plot and a green line plot. I'd like to add some figtext at 
the bottom, and I'd like the text colors to match the plot colors. So I'd have 
some text in blue and some in green.
figtext only allows one color
I could use 2 figtext, but then I have to manually find coordinate positions for 
the text. That's ugly.
It would be nice if we had a TeX-like approach, where I could create a green 
text object and a blue text object, then assemble them by stacking boxes.
Any ideas?
From: Daniele N. <da...@gr...> - 2013年10月30日 11:16:46
On 29/10/2013 21:39, Ryan Nelson wrote:
> Daniele,
> 
> I agree this is perhaps a little overly complicated. (However, once you
> figure it out, it does give you a ton of flexibility.)
The main point is not that it is overly complicated, it is that is is
severely under documented...
> I played around
> with this a bit (thanks IPython!), and I may have figured out what you
> wanted to do. I rewrote the example you linked from the MPL website. I
> couldn't simplify it much, but it does change the size, location and
> labels of the floating y axis.
Thanks! I didn't have the resources to investigate this further.
> par2.axis["right"].major_ticklabels.set_fontsize(14)
Well, this makes sense...
Cheers,
Daniele
From: Nils W. <ni...@go...> - 2013年10月30日 11:02:28
Hi all,
The "Reset original view" button is effectless in case of 3D plots.
Nils
From: Ryan N. <rne...@gm...> - 2013年10月29日 20:39:51
Daniele,
I agree this is perhaps a little overly complicated. (However, once you
figure it out, it does give you a ton of flexibility.) I played around
with this a bit (thanks IPython!), and I may have figured out what you
wanted to do. I rewrote the example you linked from the MPL website. I
couldn't simplify it much, but it does change the size, location and labels
of the floating y axis.
#################
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import matplotlib.pyplot as plt
host = host_subplot(111, axes_class=AA.Axes)
plt.subplots_adjust(right=0.75)
par1 = host.twinx()
par2 = host.twinx()
offset = 60
new_fixed_axis = par2.get_grid_helper().new_fixed_axis
par2.axis["right"] = new_fixed_axis(loc="right",
axes=par2,
offset=(offset, 0))
par2.axis["right"].toggle(all=True)
p1, = host.plot([0, 1, 2], [0, 1, 2], label="Density")
p2, = par1.plot([0, 1, 2], [0, 3, 2], label="Temperature")
p3, = par2.plot([0, 1, 2], [50, 30, 15], label="Velocity")
host.legend()
host.set_xlabel("Distance")
host.set_ylabel("Density")
host.axis["left"].label.set_color(p1.get_color())
host.set_xlim(0, 2)
host.set_ylim(0, 2)
par1.set_ylabel("Temperature")
par1.axis["right"].label.set_color(p2.get_color())
par1.set_ylim(0, 4)
par2.set_ylabel("Velocity")
par2.set_ylim(1, 65)
par2.yaxis.set_ticks( (20.0, 40.0) )
par2.yaxis.set_ticklabels( ('A', 'B') )
par2.axis["right"].label.set_color(p3.get_color())
par2.axis["right"].label.set_fontsize(18)
par2.axis["right"].major_ticklabels.set_fontsize(14)
plt.show()
##################
Hope that helps.
Ryan
On Tue, Oct 29, 2013 at 5:54 AM, Daniele Nicolodi <da...@gr...>wrote:
> On 29/10/2013 03:11, Ryan Nelson wrote:
> > Daniele,
> >
> > I noticed the same problem with the Qt backend. However, I was looking
> > at the documentation on the AxesGrid webpage here:
> > http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html
> > And I see the following warning:
> >
> > axes_grid and axisartist (but not axes_grid1) uses a custom Axes class
> > (derived from the mpl’s original Axes class). As a side effect, some
> > commands (mostly tick-related) do not work. Use axes_grid1 to avoid
> > this, or see how things are different in axes_grid and axisartist (LINK
> > needed)
> >
> > Unfortunately, no link. But perhaps there is a way to avoid using the
> > Axes class from axisartist in your use case. For example, could you
> > import the Axes class as follows:
> >
> > from matplotlib.axes import Axes
> >
> > That seems to work with the Qt and PDF backends on Windows 7 (Anaconda
> > Python).
>
> Hello Ryan,
>
> thanks for confirming the problem. I've also seen that note, but I
> thought "do not work" means that the methods raise an exception, not
> that they arbitrarily ignore arguments :(
>
> While the standard Axis class works for the cut-down example I posted,
> it does not for what I'm trying to achieve (having a second x axis below
> the main one). I came up with that solution following the matplotlib
> documentation:
>
>
> http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html#axisartist-with-parasiteaxes
>
> however I don't really understand why some of the contortions there are
> necessary (they are not explained in the documentation).
>
> Cheers,
> Daniele
>
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Nils W. <ni...@go...> - 2013年10月29日 14:53:48
Thank you very much !
On Tue, Oct 29, 2013 at 3:16 PM, Joe Kington <jof...@gm...> wrote:
> If you're asking how to do it interactively, just click on the zoom button
> again, and you should be able to fire pick events by clicking again.
>
> Hope that helps!
> -Joe
> On Oct 29, 2013 4:58 AM, "Nils Wagner" <ni...@go...> wrote:
>
>> Hi all,
>>
>> How can I use a pick event when I have used "Zoom to rectangle" before ?
>>
>> Nils
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Android is increasing in popularity, but the open development platform
>> that
>> developers love is also attractive to malware creators. Download this
>> white
>> paper to learn more about secure code signing practices that can help keep
>> Android apps secure.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
From: Joe K. <jof...@gm...> - 2013年10月29日 14:16:40
If you're asking how to do it interactively, just click on the zoom button
again, and you should be able to fire pick events by clicking again.
Hope that helps!
-Joe
On Oct 29, 2013 4:58 AM, "Nils Wagner" <ni...@go...> wrote:
> Hi all,
>
> How can I use a pick event when I have used "Zoom to rectangle" before ?
>
> Nils
>
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Nils W. <ni...@go...> - 2013年10月29日 09:57:28
Hi all,
How can I use a pick event when I have used "Zoom to rectangle" before ?
Nils
From: Daniele N. <da...@gr...> - 2013年10月29日 09:54:09
On 29/10/2013 03:11, Ryan Nelson wrote:
> Daniele,
> 
> I noticed the same problem with the Qt backend. However, I was looking
> at the documentation on the AxesGrid webpage here:
> http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html
> And I see the following warning:
> 
> axes_grid and axisartist (but not axes_grid1) uses a custom Axes class
> (derived from the mpl’s original Axes class). As a side effect, some
> commands (mostly tick-related) do not work. Use axes_grid1 to avoid
> this, or see how things are different in axes_grid and axisartist (LINK
> needed)
> 
> Unfortunately, no link. But perhaps there is a way to avoid using the
> Axes class from axisartist in your use case. For example, could you
> import the Axes class as follows:
> 
> from matplotlib.axes import Axes
> 
> That seems to work with the Qt and PDF backends on Windows 7 (Anaconda
> Python).
Hello Ryan,
thanks for confirming the problem. I've also seen that note, but I
thought "do not work" means that the methods raise an exception, not
that they arbitrarily ignore arguments :(
While the standard Axis class works for the cut-down example I posted,
it does not for what I'm trying to achieve (having a second x axis below
the main one). I came up with that solution following the matplotlib
documentation:
http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html#axisartist-with-parasiteaxes
however I don't really understand why some of the contortions there are
necessary (they are not explained in the documentation).
Cheers,
Daniele
From: Ryan N. <rne...@gm...> - 2013年10月29日 02:11:22
Daniele,
I noticed the same problem with the Qt backend. However, I was looking at
the documentation on the AxesGrid webpage here:
http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html
And I see the following warning:
axes_grid and axisartist (but not axes_grid1) uses a custom Axes class
(derived from the mpl’s original Axes class). As a side effect, some
commands (mostly tick-related) do not work. Use axes_grid1 to avoid this,
or see how things are different in axes_grid and axisartist (LINK needed)
Unfortunately, no link. But perhaps there is a way to avoid using the Axes
class from axisartist in your use case. For example, could you import the
Axes class as follows:
from matplotlib.axes import Axes
That seems to work with the Qt and PDF backends on Windows 7 (Anaconda
Python).
Ryan
On Mon, Oct 28, 2013 at 7:37 PM, Daniele Nicolodi <da...@gr...>wrote:
> On 29/10/2013 00:17, Sterling Smith wrote:
> > While your example tries to be self contained, which is great!, there is
> no difference between these two conditions...
> >
> >> if BUG:
> >> ax1 = host_subplot(111, axes_class=Axes)
> >> else:
> >> ax1 = host_subplot(111, axes_class=Axes)
>
> Ops, obvious mistake. It should read:
>
> BUG = True
> if BUG:
> ax1 = host_subplot(111 , axes_class=Axes)
> else:
> ax1 = host_subplot(111)
>
>
> Cheers,
> Daniele
>
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Daniele N. <da...@gr...> - 2013年10月28日 23:37:42
On 29/10/2013 00:17, Sterling Smith wrote:
> While your example tries to be self contained, which is great!, there is no difference between these two conditions... 
> 
>> if BUG:
>> ax1 = host_subplot(111, axes_class=Axes)
>> else:
>> ax1 = host_subplot(111, axes_class=Axes)
Ops, obvious mistake. It should read:
BUG = True
if BUG:
 ax1 = host_subplot(111 , axes_class=Axes)
else:
 ax1 = host_subplot(111)
Cheers,
Daniele
From: Daniele N. <da...@gr...> - 2013年10月28日 22:51:58
On 28/10/2013 23:30, Oliver wrote:
> Hi Daniele,
> 
> not sure, but it seems to work for me. Did you do a plt.draw() or
> plt.show() to reflect the changes?
Hello,
it investigated this a bit further and the problem presents itself only
when I use `mpl_toolkits.axisartist.Axes`. Here is a minimum example
that demonstrates the problem:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot
from mpl_toolkits.axisartist import Axes
x = np.linspace(0, 2*np.pi)
y = np.sin(x)
f = plt.figure()
BUG = True
if BUG:
 ax1 = host_subplot(111, axes_class=Axes)
else:
 ax1 = host_subplot(111, axes_class=Axes)
ax1.plot(x, y)
ax1.set_xlim(0, 2*np.pi)
ax1.set_xticks(np.linspace(0, 2*np.pi, 5))
ax1.set_xticklabels(['%.2f' % x for x in np.linspace(0, 2*np.pi, 5)],
fontsize=8)
plt.draw()
plt.show()
Cheers,
Daniele
From: Oliver <oli...@gm...> - 2013年10月28日 22:30:42
Hi Daniele,
not sure, but it seems to work for me. Did you do a plt.draw() or
plt.show() to reflect the changes?
Kind regards,
Oliver
2013年10月28日 Daniele Nicolodi <da...@gr...>
> Hello,
>
> I'm trying to change the font size for the tick labels. I've tried both
> setting it explicitly when creating the labels:
>
> ax2.set_xticklabel(['%d' % x for x in arange(10)], fontsize=10)
>
> or after:
>
> for label in ax2.get_xticklabels():
> label.set_fontsize(8)
>
> but the rendering is unaffected by the setting. This is with the MacOSX
> backend and with the PDF backend. Is it a bug or am I missing something?
>
> Thanks. Best,
> Daniele
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Daniele N. <da...@gr...> - 2013年10月28日 22:19:55
Hello,
I'm trying to change the font size for the tick labels. I've tried both
setting it explicitly when creating the labels:
 ax2.set_xticklabel(['%d' % x for x in arange(10)], fontsize=10)
or after:
 for label in ax2.get_xticklabels():
 label.set_fontsize(8)
but the rendering is unaffected by the setting. This is with the MacOSX
backend and with the PDF backend. Is it a bug or am I missing something?
Thanks. Best,
Daniele
From: Peter S. J. <pet...@gm...> - 2013年10月28日 17:45:36
Hi Matplotlib-users,
I found it was useful to be able to change the default 'Axis.labelpad'
parameter, since this value didn't scale when changing the default figure
size (in my opinion its easier to prepare figures for publication assuming
they'll need to fit in a 1-column figure). I don't consider myself
experienced enough to attempt to contribute a patch, but nevertheless here
is the hack I used in case anyone has a similar problem:
axis.py, line 652:
original: self.labelpad = 5
changed : self.labelpad = rcParams['axes.labelpad']
Then, in rcsetup.py, I added the line (at 578):
 'axes.labelpad' : [5.0, validate_float],
This lets you put
axes.labelpad : 3
for instance, in your matplotlibrc to change the default label padding.
Anyways, not sure if this is the right mailing list for this type of thing,
but just thought I'd contribute it nevertheless.
Best,
-- Peter

Showing results of 136

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