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
|
|
From: Александров П. <pet...@ma...> - 2014-10-06 16:10:47
|
Hello.
Can I use pyplot functions (such as pyplot.plot, pyplot.pcolormesh) to
plot in embedded Qt plot?
I have created the following class
class CDeltaHPlot(FigureCanvasQTAgg):
def __init__(self, parent = None):
self.figure = Figure()
self.axes = self.figure.add_subplot(111)
FigureCanvasQTAgg.__init__(self, self.figure)
self.setParent(parent)
FigureCanvasQTAgg.setSizePolicy(self, QSizePolicy.Expanding,
QSizePolicy.Expanding)
FigureCanvasQTAgg.updateGeometry(self)
self.plot()
def plot(self):
pyplot.sca(self.axes)
But it throws the following exception:
File
"/opt/develop/lib/python3.4/site-packages/matplotlib-1.4.0-py3.4-linux-x8
6_64.egg/matplotlib/pyplot.py", line 806, in sca
raise ValueError("Axes instance argument was not found in a figure.")
ValueError: Axes instance argument was not found in a figure.
Kind regards, Petr.
|
|
From: Matt S. <ma...@pl...> - 2014-10-06 08:33:35
|
Hey Ben, Sounds like a cool list. Plotly (https://plot.ly) turns matplotlib plots into interactive, D3.js plots and translates the figure into R, MATLAB, and Julia. Plotly makes the data and figure editable in a web-based GUI, assigns the plot to a URL (e.g.: https://plot.ly/~PlotBot/182), and lets users collaboratively edit the plot, data, and code online either via GUI or code. See our matplotlib docs: https://plot.ly/matplotlib/. Here's an IPython Notebook walk-through: http://nbviewer.ipython.org/gist/msund/11349097. Given the use of matplotlib in ggplot for Python, prettyplotlib, and Seaborn, the same translation applies, as shown in that Notebook. M On Sat, Oct 4, 2014 at 7:53 AM, Benjamin Root <ben...@ou...> wrote: > I working on compiling a list of third-party tools that provide > interactive features to matplotlib. I am looking for tools such as Joe's > mpldatacursor. If you know of a tool that should be included in this list, > let me know! > > Thanks, > Ben Root > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Frank L. <fra...@gm...> - 2014-10-05 21:34:29
|
hello everyone, I would like to have a list of software, which uses matplotlib to extend the wikipedia in some other languages. do you have an idea where I could find such lists? thank you! |
|
From: Chris B. <cbe...@cf...> - 2014-10-05 17:39:50
|
Hi Ben, Glue (glueviz.org) is built on top of matplotlib -- its more of an application than a toolkit for supplementing MPL, although it's new custom data viewer feature lets you easily turn static matplotlib plots into interactive, selectable plots (see http://www.glueviz.org/en/latest/custom_viewer.html). chris On Sat, Oct 4, 2014 at 8:53 AM, Benjamin Root <ben...@ou...> wrote: > I working on compiling a list of third-party tools that provide > interactive features to matplotlib. I am looking for tools such as Joe's > mpldatacursor. If you know of a tool that should be included in this list, > let me know! > > Thanks, > Ben Root > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- ************************************* Chris Beaumont Senior Software Engineer Harvard Center for Astrophysics 60 Garden Street, MS 42 Cambridge, MA 02138 chrisbeaumont.org ************************************* |
|
From: Phil E. <pel...@gm...> - 2014-10-04 15:12:36
|
Also note, you can just call plt.xkcd() and it will turn on the setting
globally for that session.
On 4 October 2014 00:11, Paul Hobson <pmh...@gm...> wrote:
> That's what the `with` statement allows you do.
>
> Say you have a function that does some plotting and returns a figure --
> call it my_plot_func.
>
> You can do:
>
> fig1 = my_plot_func()
> fig1.savefig('normal1.png')
>
> with plt.xkcd():
> fig2 = mu_plot_func()
> fig2.savefig('xkcd.png')
>
> fig2 = my_plot_func()
> fig2.savefig('normal2.png')
>
> And the xkcd image will be squiggly but the normal images won't.
> -p
>
> On Fri, Oct 3, 2014 at 12:40 PM, Christophe Bal <pro...@gm...>
> wrote:
>
>> Hello.
>>
>> I've only seen one way to use the xkcd feature. This uses a with
>> statement.
>>
>> Is there another way to use the xkcd feature so as to easily switch
>> between exact plot and trembling one ?
>>
>> Christophe BAL
>>
>>
>> ------------------------------------------------------------------------------
>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Benjamin R. <ben...@ou...> - 2014-10-04 14:54:21
|
I working on compiling a list of third-party tools that provide interactive features to matplotlib. I am looking for tools such as Joe's mpldatacursor. If you know of a tool that should be included in this list, let me know! Thanks, Ben Root |
|
From: Paul H. <pmh...@gm...> - 2014-10-03 23:11:49
|
That's what the `with` statement allows you do.
Say you have a function that does some plotting and returns a figure --
call it my_plot_func.
You can do:
fig1 = my_plot_func()
fig1.savefig('normal1.png')
with plt.xkcd():
fig2 = mu_plot_func()
fig2.savefig('xkcd.png')
fig2 = my_plot_func()
fig2.savefig('normal2.png')
And the xkcd image will be squiggly but the normal images won't.
-p
On Fri, Oct 3, 2014 at 12:40 PM, Christophe Bal <pro...@gm...> wrote:
> Hello.
>
> I've only seen one way to use the xkcd feature. This uses a with statement.
>
> Is there another way to use the xkcd feature so as to easily switch
> between exact plot and trembling one ?
>
> Christophe BAL
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Christophe B. <pro...@gm...> - 2014-10-03 19:40:35
|
Hello. I've only seen one way to use the xkcd feature. This uses a with statement. Is there another way to use the xkcd feature so as to easily switch between exact plot and trembling one ? Christophe BAL |
|
From: Fabrice C. <kap...@ya...> - 2014-10-02 22:01:56
|
Nicolas, Thank you for the link to vispy. This looks like it will be much easier for me to wrap my mind around vispy than VTK... Best regards, Fabrice "Nicolas P. Rougier" <Nic...@in...> wrote: > >You might want to have a look at vispy.org, we implemented the wx backend and there are several examples available. >(and the new glumpy home is http://glumpy.github.io) > >vispy examples at http://vispy.org/gallery.html > > >Nicolas > > >On 01 Oct 2014, at 20:27, Fabrice C. <kap...@ya...> wrote: > >> Dear Ben, >> >> Thank you for the explanation. Too bad mplot3d cannot display textured polygons. >> I did have a look at glumpy and it does part of what I am looking for. However, glumpy does not support being embedded in a wxpython application which is a requisite for me. >> >> I guess I just have to learn VTK... >> >> Thanks again, >> >> Fabrice >> >> Benjamin Root <ben...@ou...> wrote: >> >> I tried something like this awhile back to no avail. Because of the kludgy nature of mplot3d, we are lucky we even can display 2d artists like polygons (and, this is me speaking as the de facto maintainer of mplot3d!). Images are an entirely different beast, unfortunately. >> >> What *might* work is getting a pcolormesh object converted into 3d. Not pcolor (as that is an image-based object), but the QuadMesh object that gets returned by pcolormesh(). I haven't tried to convert that into a 3d equivalent, but it might be feasible. >> >> I would also check out glumpy: https://code.google.com/p/glumpy/. I could have sworn I have seen examples of glumpy treating images as "texture" data for surfaces. >> >> I hope this points you in a useful direction! >> Ben Root >> >> >> On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. <kap...@ya...> wrote: >> Dear list, >> >> I would like to display a 2D image in a mplot3d axe in order to combine >> it with a surface3D or a bar3d plot for instance. The effect I am >> looking for is similar to what can be seen in the bottom XY plane of >> http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, >> except that I would like to have a custom image instead of the filled >> contours. >> >> I googled the subject and found only messages dating at best from 2010. >> These messages mentioned that the imshow() method did not work on a >> mplot3d. Indeed it does not. >> The only alternatives offered by the googled answer to my problem were >> to switch to VTK or Mayavi. For one thing, I never managed to install >> VTK on my PC, and I already have other matplotlib figures in my wxpython >> application so I would really like to stick to matplotlib. >> >> Does anyone have pointers as to how I could display a 2D image in >> mplot3d? Do I need to create a new artist in order to replace the >> non-functionning imshow? >> I see that patch collections work fine in mplot3D. Would it be feasible >> to load an image and have it displayed as a patch collection (1 patch >> for each pixel)? >> >> Any advice would be highly appreciated, >> >> Fabrice >> >> >> --- >> This email is free from viruses and malware because avast! Antivirus protection is active. >> http://www.avast.com >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk_______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Benjamin R. <ben...@ou...> - 2014-10-02 15:39:28
|
Correction for something I said earlier. I got my pcolor and pcolormesh objects mixed up. Neither the QuadMesh nor the PolyCollection from the two functions are image-based. So they do have a glimmer of hope of being converted into 3d. The PolyCollection is the best candidate as I think there is better support for that now in mplot3d. QuadMesh is a different beast, but might be tamable. Sorry for any confusion. Cheers! Ben Root On Thu, Oct 2, 2014 at 2:03 AM, Nicolas P. Rougier <Nic...@in... > wrote: > > You might want to have a look at vispy.org, we implemented the wx backend > and there are several examples available. > (and the new glumpy home is http://glumpy.github.io) > > vispy examples at http://vispy.org/gallery.html > > > Nicolas > > > On 01 Oct 2014, at 20:27, Fabrice C. <kap...@ya...> wrote: > > > Dear Ben, > > > > Thank you for the explanation. Too bad mplot3d cannot display textured > polygons. > > I did have a look at glumpy and it does part of what I am looking for. > However, glumpy does not support being embedded in a wxpython application > which is a requisite for me. > > > > I guess I just have to learn VTK... > > > > Thanks again, > > > > Fabrice > > > > Benjamin Root <ben...@ou...> wrote: > > > > I tried something like this awhile back to no avail. Because of the > kludgy nature of mplot3d, we are lucky we even can display 2d artists like > polygons (and, this is me speaking as the de facto maintainer of mplot3d!). > Images are an entirely different beast, unfortunately. > > > > What *might* work is getting a pcolormesh object converted into 3d. Not > pcolor (as that is an image-based object), but the QuadMesh object that > gets returned by pcolormesh(). I haven't tried to convert that into a 3d > equivalent, but it might be feasible. > > > > I would also check out glumpy: https://code.google.com/p/glumpy/. I > could have sworn I have seen examples of glumpy treating images as > "texture" data for surfaces. > > > > I hope this points you in a useful direction! > > Ben Root > > > > > > On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. <kap...@ya...> > wrote: > > Dear list, > > > > I would like to display a 2D image in a mplot3d axe in order to combine > > it with a surface3D or a bar3d plot for instance. The effect I am > > looking for is similar to what can be seen in the bottom XY plane of > > http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, > > except that I would like to have a custom image instead of the filled > > contours. > > > > I googled the subject and found only messages dating at best from 2010. > > These messages mentioned that the imshow() method did not work on a > > mplot3d. Indeed it does not. > > The only alternatives offered by the googled answer to my problem were > > to switch to VTK or Mayavi. For one thing, I never managed to install > > VTK on my PC, and I already have other matplotlib figures in my wxpython > > application so I would really like to stick to matplotlib. > > > > Does anyone have pointers as to how I could display a 2D image in > > mplot3d? Do I need to create a new artist in order to replace the > > non-functionning imshow? > > I see that patch collections work fine in mplot3D. Would it be feasible > > to load an image and have it displayed as a patch collection (1 patch > > for each pixel)? > > > > Any advice would be highly appreciated, > > > > Fabrice > > > > > > --- > > This email is free from viruses and malware because avast! Antivirus > protection is active. > > http://www.avast.com > > > > > > > ------------------------------------------------------------------------------ > > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk_______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Nicolas P. R. <Nic...@in...> - 2014-10-02 06:04:03
|
You might want to have a look at vispy.org, we implemented the wx backend and there are several examples available. (and the new glumpy home is http://glumpy.github.io) vispy examples at http://vispy.org/gallery.html Nicolas On 01 Oct 2014, at 20:27, Fabrice C. <kap...@ya...> wrote: > Dear Ben, > > Thank you for the explanation. Too bad mplot3d cannot display textured polygons. > I did have a look at glumpy and it does part of what I am looking for. However, glumpy does not support being embedded in a wxpython application which is a requisite for me. > > I guess I just have to learn VTK... > > Thanks again, > > Fabrice > > Benjamin Root <ben...@ou...> wrote: > > I tried something like this awhile back to no avail. Because of the kludgy nature of mplot3d, we are lucky we even can display 2d artists like polygons (and, this is me speaking as the de facto maintainer of mplot3d!). Images are an entirely different beast, unfortunately. > > What *might* work is getting a pcolormesh object converted into 3d. Not pcolor (as that is an image-based object), but the QuadMesh object that gets returned by pcolormesh(). I haven't tried to convert that into a 3d equivalent, but it might be feasible. > > I would also check out glumpy: https://code.google.com/p/glumpy/. I could have sworn I have seen examples of glumpy treating images as "texture" data for surfaces. > > I hope this points you in a useful direction! > Ben Root > > > On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. <kap...@ya...> wrote: > Dear list, > > I would like to display a 2D image in a mplot3d axe in order to combine > it with a surface3D or a bar3d plot for instance. The effect I am > looking for is similar to what can be seen in the bottom XY plane of > http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, > except that I would like to have a custom image instead of the filled > contours. > > I googled the subject and found only messages dating at best from 2010. > These messages mentioned that the imshow() method did not work on a > mplot3d. Indeed it does not. > The only alternatives offered by the googled answer to my problem were > to switch to VTK or Mayavi. For one thing, I never managed to install > VTK on my PC, and I already have other matplotlib figures in my wxpython > application so I would really like to stick to matplotlib. > > Does anyone have pointers as to how I could display a 2D image in > mplot3d? Do I need to create a new artist in order to replace the > non-functionning imshow? > I see that patch collections work fine in mplot3D. Would it be feasible > to load an image and have it displayed as a patch collection (1 patch > for each pixel)? > > Any advice would be highly appreciated, > > Fabrice > > > --- > This email is free from viruses and malware because avast! Antivirus protection is active. > http://www.avast.com > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Adam H. <hug...@gm...> - 2014-10-01 18:48:54
|
Instead of learning VTK, you may find it easier to start with Mayavi 2 (written on VTK). On Wed, Oct 1, 2014 at 2:27 PM, Fabrice C. <kap...@ya...> wrote: > Dear Ben, > > Thank you for the explanation. Too bad mplot3d cannot display textured > polygons. > I did have a look at glumpy and it does part of what I am looking for. > However, glumpy does not support being embedded in a wxpython application > which is a requisite for me. > > I guess I just have to learn VTK... > > Thanks again, > > Fabrice > > > Benjamin Root <ben...@ou...> wrote: > > I tried something like this awhile back to no avail. Because of the kludgy > nature of mplot3d, we are lucky we even can display 2d artists like > polygons (and, this is me speaking as the de facto maintainer of mplot3d!). > Images are an entirely different beast, unfortunately. > > What *might* work is getting a pcolormesh object converted into 3d. Not > pcolor (as that is an image-based object), but the QuadMesh object that > gets returned by pcolormesh(). I haven't tried to convert that into a 3d > equivalent, but it might be feasible. > > I would also check out glumpy: https://code.google.com/p/glumpy/. I could > have sworn I have seen examples of glumpy treating images as "texture" data > for surfaces. > > I hope this points you in a useful direction! > Ben Root > > > On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. <kap...@ya...> > wrote: > >> Dear list, >> >> I would like to display a 2D image in a mplot3d axe in order to combine >> it with a surface3D or a bar3d plot for instance. The effect I am >> looking for is similar to what can be seen in the bottom XY plane of >> http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, >> except that I would like to have a custom image instead of the filled >> contours. >> >> I googled the subject and found only messages dating at best from 2010. >> These messages mentioned that the imshow() method did not work on a >> mplot3d. Indeed it does not. >> The only alternatives offered by the googled answer to my problem were >> to switch to VTK or Mayavi. For one thing, I never managed to install >> VTK on my PC, and I already have other matplotlib figures in my wxpython >> application so I would really like to stick to matplotlib. >> >> Does anyone have pointers as to how I could display a 2D image in >> mplot3d? Do I need to create a new artist in order to replace the >> non-functionning imshow? >> I see that patch collections work fine in mplot3D. Would it be feasible >> to load an image and have it displayed as a patch collection (1 patch >> for each pixel)? >> >> Any advice would be highly appreciated, >> >> Fabrice >> >> >> --- >> This email is free from viruses and malware because avast! Antivirus >> protection is active. >> http://www.avast.com >> >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Fabrice C. <kap...@ya...> - 2014-10-01 18:29:52
|
Dear Ben, Thank you for the explanation. Too bad mplot3d cannot display textured polygons. I did have a look at glumpy and it does part of what I am looking for. However, glumpy does not support being embedded in a wxpython application which is a requisite for me. I guess I just have to learn VTK... Thanks again, Fabrice Benjamin Root <ben...@ou...> wrote: >I tried something like this awhile back to no avail. Because of the kludgy >nature of mplot3d, we are lucky we even can display 2d artists like >polygons (and, this is me speaking as the de facto maintainer of mplot3d!). >Images are an entirely different beast, unfortunately. > >What *might* work is getting a pcolormesh object converted into 3d. Not >pcolor (as that is an image-based object), but the QuadMesh object that >gets returned by pcolormesh(). I haven't tried to convert that into a 3d >equivalent, but it might be feasible. > >I would also check out glumpy: https://code.google.com/p/glumpy/. I could >have sworn I have seen examples of glumpy treating images as "texture" data >for surfaces. > >I hope this points you in a useful direction! >Ben Root > > >On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. <kap...@ya...> >wrote: > >> Dear list, >> >> I would like to display a 2D image in a mplot3d axe in order to combine >> it with a surface3D or a bar3d plot for instance. The effect I am >> looking for is similar to what can be seen in the bottom XY plane of >> http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, >> except that I would like to have a custom image instead of the filled >> contours. >> >> I googled the subject and found only messages dating at best from 2010. >> These messages mentioned that the imshow() method did not work on a >> mplot3d. Indeed it does not. >> The only alternatives offered by the googled answer to my problem were >> to switch to VTK or Mayavi. For one thing, I never managed to install >> VTK on my PC, and I already have other matplotlib figures in my wxpython >> application so I would really like to stick to matplotlib. >> >> Does anyone have pointers as to how I could display a 2D image in >> mplot3d? Do I need to create a new artist in order to replace the >> non-functionning imshow? >> I see that patch collections work fine in mplot3D. Would it be feasible >> to load an image and have it displayed as a patch collection (1 patch >> for each pixel)? >> >> Any advice would be highly appreciated, >> >> Fabrice >> >> >> --- >> This email is free from viruses and malware because avast! Antivirus >> protection is active. >> http://www.avast.com >> >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> |
|
From: Paul H. <pmh...@gm...> - 2014-10-01 16:38:13
|
You mean matplotlib 1.3.1 and numpy 1.8.1, right?-- Paul Hobson Sorry if this is unintelligible. I'm on my phone. On Wed, Oct 1, 2014 at 9:36 AM, Steve McAfee <smc...@gm...> wrote: > This is really old. It's a readynas from netgear running etch with a bunch > of backports. It seems that something in numpy or matplotlib changed in the > last 6 months that caused this. There is a lengthy procedure to getting > virtualbox running on this config. The instructions for doing this are on > the readynas forum. I ran through them and they worked 6 months ago, but I > reinstalled the system for an unrelated reason and when I went back to the > instructions they wouldn't work at the step to install matplotlib. After I > realized it was because these versions were updated I got it to work by > selecting numpy 1.3.1 and matplotlib 1.8.1 which were available (by date) > the last time it worked. > Gdb was strange, the calling function showed the meta variable as a > pointer, but in the failing function it was 0x10. 0x10 happens to be the > first value in the meta data structure so it seems like a function > definition or compiler issue. Wierd, but I'm ok running the old version on > this box that doesn't change very often. > steve > On Wed, Oct 1, 2014 at 11:48 AM, Paul Hobson <pmh...@gm...> wrote: >> Which OS are you on? >> >> Before Anaconda, I would use "sudo apt-get build-dep python-matplotlib" to >> get all of the dependencies and then "sudo python setup.py install" from >> the matplotlib directory and it would work fine. >> >> Now that Anaconda is around, I just "conda create --name=mpldev matplotlib >> python=3.3" and then "source activate "mpldev" followed by "pip install -e >> ." from the matplotlib source directory. >> >> On Wed, Oct 1, 2014 at 6:40 AM, Steve <smc...@gm...> wrote: >> >>> I had installed these a couple of months ago successfully so I tried >>> versions >>> from that timeframe (numby 1.3.1 and matplotlib 1.8.1) and that worked >>> fine. >>> >>> FWIW with the latest versions the crash was at line 1965 of datetime.c. >>> The >>> meta variable was not a pointer. It was actually the value of the first >>> member of the meta variable passed in by the calling function. I'm using >>> gcc >>> 4.1.1. >>> >>> steve >>> >>> >>> >>> -- >>> View this message in context: >>> http://matplotlib.1069221.n5.nabble.com/seg-fault-installing-tp44049p44050.html >>> Sent from the matplotlib - users mailing list archive at Nabble.com. >>> >>> >>> ------------------------------------------------------------------------------ >>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> |
|
From: Nemanja S. <vla...@gm...> - 2014-10-01 16:06:43
|
Hi all guys, I am trying for a while to set width of the legend box to constant value, independent of the text inside. So far I tried with following approach: l1.get_frame().set_width(2.0) where l1 is object of legend type. After this line nothing actually happens. I was also not able to find the solution on the web. Is there any suggestion how to solve this? Thanx and chhers -- Nemanja Savić |
|
From: Steve <smc...@gm...> - 2014-10-01 13:40:53
|
I had installed these a couple of months ago successfully so I tried versions from that timeframe (numby 1.3.1 and matplotlib 1.8.1) and that worked fine. FWIW with the latest versions the crash was at line 1965 of datetime.c. The meta variable was not a pointer. It was actually the value of the first member of the meta variable passed in by the calling function. I'm using gcc 4.1.1. steve -- View this message in context: http://matplotlib.1069221.n5.nabble.com/seg-fault-installing-tp44049p44050.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Steve M. <smc...@gm...> - 2014-10-01 03:57:19
|
I'm using pip but even without it when I run setup.py build or setup.py
install in the matplotlib directory I get a segfault early in the run. If I
trace it, the seg fault is shortly after numbers.pyc is loaded from numpy,
but even if I uninstall numpy I still get a segfault when I try to install
mapplotlib. Only matplotlib has this issue. Other packages can uninstall
and reinstall fine.
steve
# pip install matplotlib
Downloading/unpacking matplotlib
Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded
Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info
for package matplotlib
Downloading
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /tmp/tmp6VPGqi
Now working in /tmp/tmp6VPGqi/distribute-0.6.28
Building a Distribute egg in /tmp/pip_build_root/matplotlib
/tmp/pip_build_root/matplotlib/distribute-0.6.28-py2.7.egg
Complete output from command python setup.py egg_info:
Downloading
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /tmp/tmp6VPGqi
Now working in /tmp/tmp6VPGqi/distribute-0.6.28
Building a Distribute egg in /tmp/pip_build_root/matplotlib
/tmp/pip_build_root/matplotlib/distribute-0.6.28-py2.7.egg
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code -11 in
/tmp/pip_build_root/matplotlib
Storing debug log for failure in /root/.pip/pip.log
# tail -20 /root/.pip/pip.log
/tmp/pip_build_root/matplotlib/distribute-0.6.28-py2.7.egg
----------------------------------------
Cleaning up...
Removing temporary dir /tmp/pip_build_root...
Command python setup.py egg_info failed with error code -11 in
/tmp/pip_build_root/matplotlib
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line
122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py",
line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle,
bundle=self.bundle)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 1229, in
prepare_files
req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 325, in
run_egg_info
command_desc='python setup.py egg_info')
File "/usr/local/lib/python2.7/site-packages/pip/util.py", line 697, in
call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code
-11 in /tmp/pip_build_root/matplotlib
|
|
From: Benjamin R. <ben...@ou...> - 2014-10-01 02:40:57
|
I tried something like this awhile back to no avail. Because of the kludgy nature of mplot3d, we are lucky we even can display 2d artists like polygons (and, this is me speaking as the de facto maintainer of mplot3d!). Images are an entirely different beast, unfortunately. What *might* work is getting a pcolormesh object converted into 3d. Not pcolor (as that is an image-based object), but the QuadMesh object that gets returned by pcolormesh(). I haven't tried to convert that into a 3d equivalent, but it might be feasible. I would also check out glumpy: https://code.google.com/p/glumpy/. I could have sworn I have seen examples of glumpy treating images as "texture" data for surfaces. I hope this points you in a useful direction! Ben Root On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. <kap...@ya...> wrote: > Dear list, > > I would like to display a 2D image in a mplot3d axe in order to combine > it with a surface3D or a bar3d plot for instance. The effect I am > looking for is similar to what can be seen in the bottom XY plane of > http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, > except that I would like to have a custom image instead of the filled > contours. > > I googled the subject and found only messages dating at best from 2010. > These messages mentioned that the imshow() method did not work on a > mplot3d. Indeed it does not. > The only alternatives offered by the googled answer to my problem were > to switch to VTK or Mayavi. For one thing, I never managed to install > VTK on my PC, and I already have other matplotlib figures in my wxpython > application so I would really like to stick to matplotlib. > > Does anyone have pointers as to how I could display a 2D image in > mplot3d? Do I need to create a new artist in order to replace the > non-functionning imshow? > I see that patch collections work fine in mplot3D. Would it be feasible > to load an image and have it displayed as a patch collection (1 patch > for each pixel)? > > Any advice would be highly appreciated, > > Fabrice > > > --- > This email is free from viruses and malware because avast! Antivirus > protection is active. > http://www.avast.com > > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Fabrice C. <kap...@ya...> - 2014-09-30 22:14:35
|
Dear list, I would like to display a 2D image in a mplot3d axe in order to combine it with a surface3D or a bar3d plot for instance. The effect I am looking for is similar to what can be seen in the bottom XY plane of http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, except that I would like to have a custom image instead of the filled contours. I googled the subject and found only messages dating at best from 2010. These messages mentioned that the imshow() method did not work on a mplot3d. Indeed it does not. The only alternatives offered by the googled answer to my problem were to switch to VTK or Mayavi. For one thing, I never managed to install VTK on my PC, and I already have other matplotlib figures in my wxpython application so I would really like to stick to matplotlib. Does anyone have pointers as to how I could display a 2D image in mplot3d? Do I need to create a new artist in order to replace the non-functionning imshow? I see that patch collections work fine in mplot3D. Would it be feasible to load an image and have it displayed as a patch collection (1 patch for each pixel)? Any advice would be highly appreciated, Fabrice --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com |
|
From: Eric F. <ef...@ha...> - 2014-09-30 18:44:54
|
On 2014/09/30, 2:41 AM, Jesper Larsen wrote: > Hi matplotlib users, > > Is it possible to disable antialiasing for a colorbar? If not directly > is it the possible to "postprocess" the axes instance to se antialiasing > for relevant elements? The colorbar returns a Colorbar object, the "solids" attribute of which is a Quadmesh; so you should be able to execute cbar.solids.set_antialiased(False) to turn off antialiasing. With a bit of testing, however, I am not seeing any difference, so I'm not sure what is going on, and I don't have time now to investigate. Eric > > The reason I am asking is because I would like to produce a paletted png > (using PIL) of the colorbar without the risk of removing any important > colors in the process (in essence the output from matplotlib needs to > have less than 256 colors for this to work). > > Best regards, > Jesper > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jesper L. <jes...@gm...> - 2014-09-30 12:42:00
|
Hi matplotlib users, Is it possible to disable antialiasing for a colorbar? If not directly is it the possible to "postprocess" the axes instance to se antialiasing for relevant elements? The reason I am asking is because I would like to produce a paletted png (using PIL) of the colorbar without the risk of removing any important colors in the process (in essence the output from matplotlib needs to have less than 256 colors for this to work). Best regards, Jesper |
|
From: Christophe B. <pro...@gm...> - 2014-09-29 11:39:09
|
Hello. Concretly, I have one figure with some plots. I only want to have the coordinates of the mouse when it is clicked over this figure. On the other hand, when I click on the button, I have the button event, but also the mouse one. Maybe, one solution would be to know that the button has been clicked such as to ignore mouse event in that case. C Le 29 sept. 2014 03:51, "Benjamin Root" <ben...@ou...> a écrit : > I am sorry, I am not sure that I understand what you are trying to do. Why > do you want the same action to happen whenever you click the mouse button > (anywhere in the figure), and whenever you click the mouse button (when you > are over the button)? The two areas overlap, so it would always trigger the > action twice when clicking on the button. > > Why are you attaching the callback to mouse button clicking when it is > already attached to the Button? > > Ben Root > > P.S. - please keep the coverstation on-list. > > > On Sun, Sep 28, 2014 at 5:36 PM, Christophe Bal <pro...@gm...> > wrote: > >> Hello. >> >> I want to use both mouse event, that works without the button, and also a >> button but adding this ones makes the mouse event also working on this >> button. >> >> The problem would be to connect the mouse event only with the first axe. >> Can I do that ? Sorry but for the moment, I'm a real noob. >> >> 2014-09-28 21:53 GMT+02:00 Benjamin Root <ben...@ou...>: >> >>> Does this example help? >>> http://matplotlib.org/examples/widgets/buttons.html >>> >>> With the Button widget, you won't need to do any mpl_connect calls, the >>> widget takes care of that for you. Also, as a side note, the >>> "button_press_event" does not refer to the button widgets, it refers to the >>> mouse button. >>> >>> Cheers! >>> Ben Root >>> >>> >>> On Sat, Sep 27, 2014 at 6:30 PM, Christophe Bal <pro...@gm...> >>> wrote: >>> >>>> Hello. >>>> >>>> In the following code, I would like to add two buttons. Is there an >>>> easy way to do that ? >>>> >>>> Christophe >>>> >>>> >>>> ================================ >>>> >>>> import matplotlib.pyplot as plt >>>> from matplotlib.widgets import Button >>>> >>>> fig = plt.figure() >>>> >>>> plt.axes(xlim = (0, 3), ylim = (0, 3)) >>>> >>>> def onclick(event): >>>> print(event.xdata, event.ydata) >>>> >>>> fig.canvas.mpl_connect('button_press_event', onclick) >>>> >>>> plt.show() >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >>>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >>>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >>>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >>>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>>> >>> >> > |
|
From: Benjamin R. <ben...@ou...> - 2014-09-29 01:51:42
|
I am sorry, I am not sure that I understand what you are trying to do. Why do you want the same action to happen whenever you click the mouse button (anywhere in the figure), and whenever you click the mouse button (when you are over the button)? The two areas overlap, so it would always trigger the action twice when clicking on the button. Why are you attaching the callback to mouse button clicking when it is already attached to the Button? Ben Root P.S. - please keep the coverstation on-list. On Sun, Sep 28, 2014 at 5:36 PM, Christophe Bal <pro...@gm...> wrote: > Hello. > > I want to use both mouse event, that works without the button, and also a > button but adding this ones makes the mouse event also working on this > button. > > The problem would be to connect the mouse event only with the first axe. > Can I do that ? Sorry but for the moment, I'm a real noob. > > 2014-09-28 21:53 GMT+02:00 Benjamin Root <ben...@ou...>: > >> Does this example help? >> http://matplotlib.org/examples/widgets/buttons.html >> >> With the Button widget, you won't need to do any mpl_connect calls, the >> widget takes care of that for you. Also, as a side note, the >> "button_press_event" does not refer to the button widgets, it refers to the >> mouse button. >> >> Cheers! >> Ben Root >> >> >> On Sat, Sep 27, 2014 at 6:30 PM, Christophe Bal <pro...@gm...> >> wrote: >> >>> Hello. >>> >>> In the following code, I would like to add two buttons. Is there an easy >>> way to do that ? >>> >>> Christophe >>> >>> >>> ================================ >>> >>> import matplotlib.pyplot as plt >>> from matplotlib.widgets import Button >>> >>> fig = plt.figure() >>> >>> plt.axes(xlim = (0, 3), ylim = (0, 3)) >>> >>> def onclick(event): >>> print(event.xdata, event.ydata) >>> >>> fig.canvas.mpl_connect('button_press_event', onclick) >>> >>> plt.show() >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >> > |
|
From: Benjamin R. <ben...@ou...> - 2014-09-28 19:53:34
|
Does this example help? http://matplotlib.org/examples/widgets/buttons.html With the Button widget, you won't need to do any mpl_connect calls, the widget takes care of that for you. Also, as a side note, the "button_press_event" does not refer to the button widgets, it refers to the mouse button. Cheers! Ben Root On Sat, Sep 27, 2014 at 6:30 PM, Christophe Bal <pro...@gm...> wrote: > Hello. > > In the following code, I would like to add two buttons. Is there an easy > way to do that ? > > Christophe > > > ================================ > > import matplotlib.pyplot as plt > from matplotlib.widgets import Button > > fig = plt.figure() > > plt.axes(xlim = (0, 3), ylim = (0, 3)) > > def onclick(event): > print(event.xdata, event.ydata) > > fig.canvas.mpl_connect('button_press_event', onclick) > > plt.show() > > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Christophe B. <pro...@gm...> - 2014-09-27 22:30:23
|
Hello.
In the following code, I would like to add two buttons. Is there an easy
way to do that ?
Christophe
================================
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
fig = plt.figure()
plt.axes(xlim = (0, 3), ylim = (0, 3))
def onclick(event):
print(event.xdata, event.ydata)
fig.canvas.mpl_connect('button_press_event', onclick)
plt.show()
|