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
(1) |
3
|
4
(1) |
5
|
6
(1) |
7
(12) |
8
(6) |
9
(16) |
10
(2) |
11
|
12
|
13
|
14
(1) |
15
|
16
|
17
(1) |
18
(1) |
19
|
20
(2) |
21
|
22
(4) |
23
(2) |
24
|
25
|
26
(1) |
27
(6) |
28
(1) |
29
(6) |
30
(3) |
31
(4) |
|
On 2014年01月08日 11:40 AM, Skip Montanaro wrote: > Apologies. Gmail (or my fingers) were acting up... > > On Wed, Jan 8, 2014 at 3:39 PM, Skip Montanaro <sk...@po...> wrote: >> I'm happy with the draggable legends, but I have a problem. It seems >> there are three pointer modes, the initial mode (updates x, y as you >> move the mouse), zoom rectangle mode, and pan/zoom mode. Once I enter >> either of those modes, I can't see how to get back to the original >> mode. I found this navigation documentation: > > http://matplotlib.org/users/navigation_toolbar.html > > but I didn't see any way to get back to the starting mode (what's that > mode called?), and the legend can only be moved as far as I can tell > when that is the current mode. If you are in pan/zoom or rectangle mode, just unselect it by clicking its select button again. Ideally we would have an obvious radio button setup for this. Eric > > Thx, > > Skip
Apologies. Gmail (or my fingers) were acting up... On Wed, Jan 8, 2014 at 3:39 PM, Skip Montanaro <sk...@po...> wrote: > I'm happy with the draggable legends, but I have a problem. It seems > there are three pointer modes, the initial mode (updates x, y as you > move the mouse), zoom rectangle mode, and pan/zoom mode. Once I enter > either of those modes, I can't see how to get back to the original > mode. I found this navigation documentation: http://matplotlib.org/users/navigation_toolbar.html but I didn't see any way to get back to the starting mode (what's that mode called?), and the legend can only be moved as far as I can tell when that is the current mode. Thx, Skip
I'm happy with the draggable legends, but I have a problem. It seems there are three pointer modes, the initial mode (updates x, y as you move the mouse), zoom rectangle mode, and pan/zoom mode. Once I enter either of those modes, I can't see how to get back to the original mode. I found this navigation documentation:
I am trying to update a figure in a loop: import matplotlib.pyplot as plt plt.ion() plt.figure (1) def c2r (z): return z.real, z.imag plt.hexbin (*c2r (run_ofdm (xconst_pred)[:opt.used]), mincnt=1) plt.draw() But no figure appears on the screen. What am I doing wrong? This is using using Qt4Agg (I think, that's what's in my matplotlibrc)
Le 07/01/2014 17:51, Paul Hobson a écrit : > I believe (as of v1.3.1) that after you create the legend you call > leg.draggable(True) I had never heard of that nice possibility! Would it make sense to add a few lines to the Legend Guide/Legend location ? http://matplotlib.org/users/legend_guide.html#legend-location and possibly to the legend demo ? http://matplotlib.org/examples/api/legend_demo.html (and remove http://matplotlib.org/examples/old_animation/draggable_legend.html ?) best, Pierre
Sorry, had forgot to reply all: Thanks Joe, that's perfect. I appreciate the tip, as I would not have realized I needed a PathCollection for lines and curves. PS, do you know if it is possible to have a background image behind a plot of patches? I know it's doable for scatter, but hadn't seen an example for patch plots in general. Paul, thanks for you help as well. I'm actually pretty confident in the primitives I've chosen. I was inspired by scikit-image.draw: http://scikit-image.org/docs/dev/api/skimage.draw.html Which returns the indicies of an array, such that anytime one ones to draw the array, they merely pass by index. For example: image = np.zeroes( (256, 256) ) rr, cc = draw.circle( center=(128,128), radius=5) image[rr, cc] = (1, 0, 0) The code above would generate a red circle. My library creates primitive classes that have an rr, cc attribute, with enough metadata to hide effectively bury this representation. This can be generated a number of ways, but the classes take care of all of this, as well as other aspects. By keeping only these indicies as primitives, the shapes can be manipulated and managed outside of any representation (ie the image). What I'd like to do is build wrappers to return PatchCollections from my already storred rr, cc data (and other metadata that is stored). In this way, I'll be able to add the very nice patches from matplotlib, but retain the same api. The project is called "pyparty" and I'll share it pretty soon with the scikit image mailing list. If I am able to get the patches built it, would anyone mind if I share it with the matplotlib list as well? Thanks On Tue, Jan 7, 2014 at 4:10 PM, Joe Kington <jof...@gm...> wrote: > > > > On Tue, Jan 7, 2014 at 2:29 PM, Adam Hughes <hug...@gm...>wrote: > >> Sorry, quick followup. I did find the gallery example to plot multiple >> patches together: >> >> http://matplotlib.org/examples/api/patch_collection.html >> >> That's excellent. Now I guess my question is how best to generalize the >> process of turning my objects into patches. I think I will just try to >> keep the geometry (ie line --> mpatch.Line) unless anyone has any better >> suggestions. >> > > As you've already found out, it sounds like you want a PatchCollection. > > There is one catch, though. Your lines/curves will need to be converted > to PathPatches (which is trivial), which can then have a facecolor. > Because all items in a collection will have the same facecolor by default, > this means that your lines will become "filled" polygons, unless you > specify otherwise. > > Therefore, you'll need to do something like this: > > import matplotlib.pyplot as plt > from matplotlib.path import Path > import matplotlib.patches as mpatches > from matplotlib.collections import PatchCollection > > # Just a simple line, but it could be a bezier curve, etc. > line = Path([(-20, -20), (-10, 10), (20, 20)]) > > # We'll need to convert the line to a PathPatch, and we'll throw in a > circle, too > line = mpatches.PathPatch(line) > circle = mpatches.Circle([0, 0]) > > # If we don't specify facecolor='none' for the line, it will be filled! > col = PatchCollection([line, circle], facecolors=['none', 'red']) > > fig, ax = plt.subplots() > ax.add_collection(col) > ax.autoscale() > plt.show() > > Alternatively, you can just put the lines/curves in a PathCollection and > the patches/polygons/etc in a PatchCollection. > > Hope that helps! > -Joe > > >> >> Thanks! >> >> >> On Tue, Jan 7, 2014 at 3:08 PM, Adam Hughes <hug...@gm...>wrote: >> >>> Hi, >>> >>> I am working on a library for image analysis which stores particles as >>> indexed numpy arrays and provides functionality for managing the particles >>> beyond merely image masking or altering the arrays directly. I've already >>> designed classes for many common shapes including Lines/Curves, >>> Circles/Ellipses, Polygons, Multi-shapes (eg 4 circles with variable >>> overlap). >>> >>> What I'd really LOVE to do would be able to generate a >>> matplotlib.Collection instance from these objects as generally as possible. >>> Then, I'd be able to show data as a masked image, but also get a really >>> nice looking plot from the objects in their Collection representation. >>> >>> So my question really is in the implementation. First, is there a >>> general collection object that could work with ANY shape, or am I better >>> off matching my shape to that collection? For example: >>> >>> line --> LineCollection *vs.* line --> GeneralCollection >>> circle --> CircleCollection circle ---> GeneralCollection >>> >>> And then, is the Collections plotting API flexible enough to mix all of >>> these types together? Or would I have to settle for only being able to >>> plot a collection of any 1 shape type at at time? >>> >>> I will delve into the API further, but ascertaining this information >>> would really help me get started. >>> >>> Thanks >>> >> >> >> >> ------------------------------------------------------------------------------ >> Rapidly troubleshoot problems before they affect your business. Most IT >> organizations don't have a clear picture of how application performance >> affects their revenue. With AppDynamics, you get 100% visibility into your >> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >> Pro! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >
On Tue, Jan 7, 2014 at 2:29 PM, Adam Hughes <hug...@gm...> wrote: > Sorry, quick followup. I did find the gallery example to plot multiple > patches together: > > http://matplotlib.org/examples/api/patch_collection.html > > That's excellent. Now I guess my question is how best to generalize the > process of turning my objects into patches. I think I will just try to > keep the geometry (ie line --> mpatch.Line) unless anyone has any better > suggestions. > As you've already found out, it sounds like you want a PatchCollection. There is one catch, though. Your lines/curves will need to be converted to PathPatches (which is trivial), which can then have a facecolor. Because all items in a collection will have the same facecolor by default, this means that your lines will become "filled" polygons, unless you specify otherwise. Therefore, you'll need to do something like this: import matplotlib.pyplot as plt from matplotlib.path import Path import matplotlib.patches as mpatches from matplotlib.collections import PatchCollection # Just a simple line, but it could be a bezier curve, etc. line = Path([(-20, -20), (-10, 10), (20, 20)]) # We'll need to convert the line to a PathPatch, and we'll throw in a circle, too line = mpatches.PathPatch(line) circle = mpatches.Circle([0, 0]) # If we don't specify facecolor='none' for the line, it will be filled! col = PatchCollection([line, circle], facecolors=['none', 'red']) fig, ax = plt.subplots() ax.add_collection(col) ax.autoscale() plt.show() Alternatively, you can just put the lines/curves in a PathCollection and the patches/polygons/etc in a PatchCollection. Hope that helps! -Joe > > Thanks! > > > On Tue, Jan 7, 2014 at 3:08 PM, Adam Hughes <hug...@gm...>wrote: > >> Hi, >> >> I am working on a library for image analysis which stores particles as >> indexed numpy arrays and provides functionality for managing the particles >> beyond merely image masking or altering the arrays directly. I've already >> designed classes for many common shapes including Lines/Curves, >> Circles/Ellipses, Polygons, Multi-shapes (eg 4 circles with variable >> overlap). >> >> What I'd really LOVE to do would be able to generate a >> matplotlib.Collection instance from these objects as generally as possible. >> Then, I'd be able to show data as a masked image, but also get a really >> nice looking plot from the objects in their Collection representation. >> >> So my question really is in the implementation. First, is there a >> general collection object that could work with ANY shape, or am I better >> off matching my shape to that collection? For example: >> >> line --> LineCollection *vs.* line --> GeneralCollection >> circle --> CircleCollection circle ---> GeneralCollection >> >> And then, is the Collections plotting API flexible enough to mix all of >> these types together? Or would I have to settle for only being able to >> plot a collection of any 1 shape type at at time? >> >> I will delve into the API further, but ascertaining this information >> would really help me get started. >> >> Thanks >> > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Adam, Not sure if this is the try you're trying to bark up, but I've used a total hack to do what I think you're describing: 1) store lists of coordinate pairs in a pandas DataFrame 2) use df.apply() to turn each list of coords in to a patch and add to an axes object I'm sure you know this, but for posterity's sake, I'll mention that you *really* should only store primitives in pandas DataFrames. For that reason alone, I would describe the method above as the death-throes of a failing project trying to meet deadlines. Perhaps a more robust way would be to store the coordinates in a "long" format, i.e., shapeid, vertexid, x, y 1,1,0,0 1,2,1,1 1,3,2,2 2,1,10,10 2,2,11,11 3,3,12,12 ... And the group that DataFrame by `shapeid` and use `apply` on the pandas GroupBy object to construct a patch and add it to an axes object. Just a thought. On Tue, Jan 7, 2014 at 12:29 PM, Adam Hughes <hug...@gm...> wrote: > Sorry, quick followup. I did find the gallery example to plot multiple > patches together: > > http://matplotlib.org/examples/api/patch_collection.html > > That's excellent. Now I guess my question is how best to generalize the > process of turning my objects into patches. I think I will just try to > keep the geometry (ie line --> mpatch.Line) unless anyone has any better > suggestions. > > Thanks! > > > On Tue, Jan 7, 2014 at 3:08 PM, Adam Hughes <hug...@gm...>wrote: > >> Hi, >> >> I am working on a library for image analysis which stores particles as >> indexed numpy arrays and provides functionality for managing the particles >> beyond merely image masking or altering the arrays directly. I've already >> designed classes for many common shapes including Lines/Curves, >> Circles/Ellipses, Polygons, Multi-shapes (eg 4 circles with variable >> overlap). >> >> What I'd really LOVE to do would be able to generate a >> matplotlib.Collection instance from these objects as generally as possible. >> Then, I'd be able to show data as a masked image, but also get a really >> nice looking plot from the objects in their Collection representation. >> >> So my question really is in the implementation. First, is there a >> general collection object that could work with ANY shape, or am I better >> off matching my shape to that collection? For example: >> >> line --> LineCollection *vs.* line --> GeneralCollection >> circle --> CircleCollection circle ---> GeneralCollection >> >> And then, is the Collections plotting API flexible enough to mix all of >> these types together? Or would I have to settle for only being able to >> plot a collection of any 1 shape type at at time? >> >> I will delve into the API further, but ascertaining this information >> would really help me get started. >> >> Thanks >> > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Sorry, quick followup. I did find the gallery example to plot multiple patches together: http://matplotlib.org/examples/api/patch_collection.html That's excellent. Now I guess my question is how best to generalize the process of turning my objects into patches. I think I will just try to keep the geometry (ie line --> mpatch.Line) unless anyone has any better suggestions. Thanks! On Tue, Jan 7, 2014 at 3:08 PM, Adam Hughes <hug...@gm...> wrote: > Hi, > > I am working on a library for image analysis which stores particles as > indexed numpy arrays and provides functionality for managing the particles > beyond merely image masking or altering the arrays directly. I've already > designed classes for many common shapes including Lines/Curves, > Circles/Ellipses, Polygons, Multi-shapes (eg 4 circles with variable > overlap). > > What I'd really LOVE to do would be able to generate a > matplotlib.Collection instance from these objects as generally as possible. > Then, I'd be able to show data as a masked image, but also get a really > nice looking plot from the objects in their Collection representation. > > So my question really is in the implementation. First, is there a general > collection object that could work with ANY shape, or am I better off > matching my shape to that collection? For example: > > line --> LineCollection *vs.* line --> GeneralCollection > circle --> CircleCollection circle ---> GeneralCollection > > And then, is the Collections plotting API flexible enough to mix all of > these types together? Or would I have to settle for only being able to > plot a collection of any 1 shape type at at time? > > I will delve into the API further, but ascertaining this information would > really help me get started. > > Thanks >
Hi, I am working on a library for image analysis which stores particles as indexed numpy arrays and provides functionality for managing the particles beyond merely image masking or altering the arrays directly. I've already designed classes for many common shapes including Lines/Curves, Circles/Ellipses, Polygons, Multi-shapes (eg 4 circles with variable overlap). What I'd really LOVE to do would be able to generate a matplotlib.Collection instance from these objects as generally as possible. Then, I'd be able to show data as a masked image, but also get a really nice looking plot from the objects in their Collection representation. So my question really is in the implementation. First, is there a general collection object that could work with ANY shape, or am I better off matching my shape to that collection? For example: line --> LineCollection *vs.* line --> GeneralCollection circle --> CircleCollection circle ---> GeneralCollection And then, is the Collections plotting API flexible enough to mix all of these types together? Or would I have to settle for only being able to plot a collection of any 1 shape type at at time? I will delve into the API further, but ascertaining this information would really help me get started. Thanks
On 07.01.2014 18:18, Fabrice Silva wrote: > Le mardi 07 janvier 2014 à 17:57 +0100, V. Armando Sole a écrit : >> > What about using axvline with the picker argument? >> > see http://matplotlib.org/users/event_handling.html >> > >> >> I think axvline is part of the pyplot interface that I am not using. >> >> However your link is going to help me a lot. I thought picking was >> restricted to patches, and I had missed Line2D is an Artist too with >> the >> same capabilities. > > axvline is a pyplot function, but it is also a method of the Axes > class. > So if you have an Axes in your Figure, everything is ok > http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.axvline > Even better :-) Thanks a lot, Armando
Le mardi 07 janvier 2014 à 17:57 +0100, V. Armando Sole a écrit : > > What about using axvline with the picker argument? > > see http://matplotlib.org/users/event_handling.html > > > > I think axvline is part of the pyplot interface that I am not using. > > However your link is going to help me a lot. I thought picking was > restricted to patches, and I had missed Line2D is an Artist too with the > same capabilities. axvline is a pyplot function, but it is also a method of the Axes class. So if you have an Axes in your Figure, everything is ok http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.axvline regards
> I believe (as of v1.3.1) that after you create the legend you call > leg.draggable(True) > http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable Outstanding! (Google was not my friend here. I wasn't searching for "draggable.") Skip
On 07.01.2014 16:27, Fabrice Silva wrote: > Le mardi 07 janvier 2014 à 15:19 +0100, "V. Armando Solé" a écrit : >> Hello, >> >> I am trying to add some vertical lines into a matplotlib figure >> axes. >> >> The idea is to detect when the mouse passes over those lines in >> order to >> displace them following the mouse if the left button is pressed. >> >> I need some help to know the simplest way to proceed. Currently I am >> looking into matplotlib.patches and considering to use a Polygon or >> a >> Rectangle but perhaps that solution is overkill for a simple line. >> Is >> there any example about how to do it? I am not using the pyplot >> interface but instantiating myself the Figure, the FigureCanvas and >> adding the axes to the figure. > > What about using axvline with the picker argument? > see http://matplotlib.org/users/event_handling.html > I think axvline is part of the pyplot interface that I am not using. However your link is going to help me a lot. I thought picking was restricted to patches, and I had missed Line2D is an Artist too with the same capabilities. Armando
I believe (as of v1.3.1) that after you create the legend you call leg.draggable(True) http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable On Tue, Jan 7, 2014 at 6:37 AM, Skip Montanaro <sk...@po...> wrote: > Sometimes the legend simply gets in the way. You can't always guess > the correct placement (think generic tool which processes lots of > different input data sets), or zooming/panning makes it obscure a > chunk of the plot you want to look at. Is it possible to move it > interactively? I'm using mpl 1.3.1. > > Thx, > > Skip > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Le mardi 07 janvier 2014 à 15:19 +0100, "V. Armando Solé" a écrit : > Hello, > > I am trying to add some vertical lines into a matplotlib figure axes. > > The idea is to detect when the mouse passes over those lines in order to > displace them following the mouse if the left button is pressed. > > I need some help to know the simplest way to proceed. Currently I am > looking into matplotlib.patches and considering to use a Polygon or a > Rectangle but perhaps that solution is overkill for a simple line. Is > there any example about how to do it? I am not using the pyplot > interface but instantiating myself the Figure, the FigureCanvas and > adding the axes to the figure. What about using axvline with the picker argument? see http://matplotlib.org/users/event_handling.html
Sometimes the legend simply gets in the way. You can't always guess the correct placement (think generic tool which processes lots of different input data sets), or zooming/panning makes it obscure a chunk of the plot you want to look at. Is it possible to move it interactively? I'm using mpl 1.3.1. Thx, Skip
Hello, I am trying to add some vertical lines into a matplotlib figure axes. The idea is to detect when the mouse passes over those lines in order to displace them following the mouse if the left button is pressed. I need some help to know the simplest way to proceed. Currently I am looking into matplotlib.patches and considering to use a Polygon or a Rectangle but perhaps that solution is overkill for a simple line. Is there any example about how to do it? I am not using the pyplot interface but instantiating myself the Figure, the FigureCanvas and adding the axes to the figure. Thanks for your time, Armando
Hi all, I am running a script that cranks out multiple plots in a loop. The script has plt.show() as the very last line as I think you are supposed to do. All plots show up, but I get a seg fault (sometimes a bus error - I haven't figured why it occasionally does that) when I close the last plot and the script exits. I was wondering if someone could help me figure out what info to grab to determine what is causing it. I use gentoo and recently did an upgrade world, so I am guessing some new library is not playing nicely as this always seemed to work before. Also, when I switch to Qt4Agg backend, everything works as expected, but if I can help iron out a bug, I would like to - I really think that matplotlib is an excellent piece of software. Pertinent info: uname -a: Linux dayd 3.10.15-gentoo #6 SMP Sat Dec 14 15:53:47 MST 2013 x86_64 Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz GenuineIntel GNU/Linux Matplotlib version - 1.3.1 matplotlibrc: backend: TkAgg (Qt4Agg works as expected) interactive: False because it segfaults python3.3 testplot.py --verbose-helpful > output.txt outputs nothing gcc --version: gcc (Gentoo 4.8.2 p1.0, pie-0.5.8) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. script to reproduce the problem: import sys import matplotlib.pyplot as plt def main(): for x in range(6): plt.figure() plt.title(x) plt.plot([1,1],[1,1],'r.') plt.show() if __name__ == "__main__": sys.exit(main()) I found some instructions on how to get debug info when you install a package in gentoo. If anyone else can recreate this or need some more info from me - please let me know. I will do what I can. Thanks!
Hi all, after upgrading to matplotlib 1.3.1, I noticed some display errors on the plots with regard to accented characters (such as carons etc.). As I recall, I had similar problem in the past and could work around them by modifying rcParams, however, this fix doesn't work as expected in 1.3.1. (with python 2.7.6, 32bit on Win 7, Czech - with both WXAgg and TKAgg backends). >From the usual Czech diacritics áčďéěíňóřšťúůýž some are not displayed (ďěňřťů) - replacement squares are shown instead. Simply prepending a suitable font at the beginning of the list rcParams['font.sans-serif'] doesn't help in 1.3.1. I eventually found out, that "Bitstream Vera Sans" (which is not installed on this computer) is somehow offending - as long as this item is in the list (even at the end), the mentioned characters aren't displayed. The problem can be observed in the following simple pylab script: ============== #! Python # -*- coding: utf-8 -*- # with implicit fonts "ďěňřťů" are not displayed properly in the plot title from matplotlib import rcParams rcParams['font.family'] = 'sans-serif' if "Bitstream Vera Sans" in rcParams['font.sans-serif']: rcParams['font.sans-serif'].remove("Bitstream Vera Sans") # after appending the "offending" font even at the end of the list (by uncommenting the following line), ďěňřťů are not displayed again # rcParams['font.sans-serif'].append("Bitstream Vera Sans") import pylab pylab.title(u"abcd áčďéěíňóřšťúůýž äöüß ê xyz") pylab.show() ============== Is there something special in the resolution of the font items in rcParams? This individual issue seems to be fixed with removing the single font, but I'd like to understand this more generally, as the installed fonts on different computers differ. Thanks in advance Vlastimil Brom
Hi, Does somebody knows how can I remove a backgroundimage. I set the image with imshow. regards, flambert -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Remove-backgroundimage-tp42658.html Sent from the matplotlib - users mailing list archive at Nabble.com.