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: Sudheer J. <sud...@ya...> - 2013-02-07 11:24:48
|
Dear Users, I am relatively new to Matplotlib. I wanted to find cross correlation between 2 time series for my research and was looking at options available with python and found http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.xcorr . However I wanted to save the results in a netcdf file for further use. ie the correlation, lags and significance if possible. Is there a way to get the corr and lags from the axis.xcorr ?? any help in this matter will be greatly appreciated. Sudheer *************************************************************** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo...@gm...;sud...@ya... Web- http://oppamthadathil.tripod.com *************************************************************** |
|
From: Dieter <die...@ed...> - 2013-02-04 10:34:11
|
Thanks everybody, very insightful. I will specifically have a look at the pgf-tikz-backend, sounds great! Dieter -- View this message in context: http://matplotlib.1069221.n5.nabble.com/CMYK-tp40352p40394.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Thomas S. <spr...@hd...> - 2013-02-02 10:24:43
|
Am 30.01.2013 um 19:38 schrieb Eric Firing: > My somewhat vague recollection is that CMYK is fundamentally > output-device dependent, As is RGB by the way. Define Red: Fire-Engine-Red? Red-as-your-spouses-lips-red? After a glass-of-red-wine-lips-red? Just in RGB, world and dog settled for the pretty meagre sRGB standard for TV-like display devices (a.k.a. computer screens) Digital cameras do work better / cover more colours, therefore they should better use AdobeRGB. Alas, mostly it's a layer 8 problem, and there are no profiles or sRGB attached. You want to go independent: use Lab or Luv or Lch colour spaces. cheers Thomas |
|
From: Thomas S. <spr...@hd...> - 2013-02-02 10:18:00
|
For what it's worth: Take a look at www.littlecms.com, its' python bindings: https://launchpad.net/pylittlecms and http://www.cazabon.com/pyCMS/ which seemingly has been built into PIL. I don't see the big deal in putting properly tagged RGB files into any publication, and then have the RIP decide what to do with this. Most of the RIPS will treat untagged RGB as sRGB. Unless you're a weird colour scientist, and know what you're doing, you may just end up doing fine. For the publications: ICC Profiles are NOT os dependent. And as a matter of fact, Adobe distributed profiles normally are pretty outdated, to the detriment of all involved in the printing process. IsoCoatedv2 has evolved as a standard-catch-all cmyk color space, IN EUROPE. The States: not so much. They use SWOP or whatever the Brickworks (Adobe) seem to default. If the scientific publishers do not accept pdf, but force you to submit word, you shall be fine with RGB, since word only speaks "someuntaggedRGB" If they insist in CMYK, ask them for the proper profile. Otherwise, you have the same no-control just cast me colours in any direction approach as by using untagged RGB colors. For your conversions, you may just need: http://www.graphicsmagick.org/ Unfortunately, gm does it the chaotic way, which might suffice to get your job done the quick way, yet unpredictable: convert -colorspace CMYK infile outfile hth Thomas Am 31.01.2013 um 18:08 schrieb Dieter: > Thanks everybody for the input. As I see the answer is no, but it could be > implemented. > > I did an extensive search, but I even struggle to find a good and practical > solution how to convert a VECTORPLOT RGB to CMYK on a linux system. (One way > I often found would be the Adobe suits, which I do not have.) I gave > mpl_ps_cmyk a go, but execution failed, and the page looks dated. > Furthermore, Adobes seems to provide ICCs only for Windows and Mac, but not > for Linux. ImageMagick rasterizes the figure, the same with GIMP. > > I agree that this should be done on the publisher's side, but as a matter of > fact it is the requirement of some journals. > > Is there really no practical way to do this? How do others convert RGB plots > to CMYK? (Importing my data into Matlab and plotting them there cannot be > the only possibility!) > > Thanks everybody again, much appreciated! > Dieter > > > > -- > View this message in context: http://matplotlib.1069221.n5.nabble.com/CMYK-tp40352p40379.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Pau <vim...@go...> - 2013-02-01 22:48:15
|
Hi,
that's true... I have been playing with maxima.
I define the function
F(x,y,z):=38244.74787*%pi*(x^2+y^2+z^2)^0.125
+1615.975261*%pi*z^2/(x^2+y^2+z^2)^0.875
+(-1292.78021)*%pi*z^2/((x^2+y^2+z^2)^0.875*(1+y^2/x^2))
+1292.78021*%pi*(x^2+y^2+z^2)^0.125/(1+y^2/x^2);
then I factor it
factor(F(x,y,z)=0);
Multiply it by the denominator
% * 32365900000*(z^2+y^2+x^2)^(7/8);
divide by pi
% / %pi;
So that F(x,y,z)=0 is equivalent to
1290128178785633*z^2+1237825685085633*y^2+1279667680084472*x^2=0
The only real solution is 0,0,0,
But then I try to define a cube centered at the origin which contains
at least a part of the surface:
load(draw);
n: 10$
draw3d(
enhanced3d = true,
implicit(
F(x,y,z) = k,
x,-n,n,y,-n,n,z,-n,n));
Since it's taking huge values even for small x,y,z, one has to use
either very small n or very large k but even in that case I get
draw3d (implicit): non real value
How could I check the same in matplotlib?
Am I missing something? Maybe this is a bug in maxima...
Any help will be appreciated!
On Tue, Jan 22, 2013 at 3:29 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Mon, Jan 21, 2013 at 8:06 PM, Pau <vim...@go...> wrote:
>>
>> Hi,
>>
>> I am somehow new to matplotlib and I am trying to plot this function of x
>> ,y ,z
>>
>> F(x,y,z)=
>> 38244.74787*Pi*(x^2+y^2+z^2)^.125+1615.975261*Pi*z^2/(x^2+y^2+z^2)^.875-1292.780210*Pi*z^2/((x^2+y^2+z^2)^.875*(1+y^2/x^2))+1292.78*Pi*(x^2+y^2+z^2)^.125/(1+y^2/x^2)
>>
>> in a similar way as
>>
>> http://matplotlib.org/mpl_examples/mplot3d/contour3d_demo3.hires.png
>>
>> The code is
>> http://matplotlib.org/mpl_examples/mplot3d/contour3d_demo3.py
>>
>> But I have no idea where to start...
>>
>> some help would be appreciated...
>>
>> thanks
>>
>
> The reason you are having difficulty coming up with a way to plot this is
> because you have 3 input dimensions, and 1 output dimension that you wish to
> plot. If you were to plot this in 3D space, it would have to be done as
> F(x,y,z) as a colored "mist" in the domain of (x,y,z). While a "mist" can't
> be done in mplot3d, you could plot out scatter points to emulate this. One
> could also use contourf3d(..., zdir='z', offset=...) to create slices of the
> filled contours, similar to this example:
>
> http://matplotlib.org/examples/mplot3d/contourf3d_demo2.html
>
> Now, if the domain of (x,y,z) can be parameterized as a surface (i.e., a
> sphere or a cylinder), then you are looking to do an image of F(x,y,z)
> plotted on that surface, which is a little bit difficult, but also do-able
> using the plot_surface() function.
>
> Cheers!
> Ben Root
>
|
|
From: Andreas H. <li...@hi...> - 2013-02-01 16:40:23
|
Hi, I often use mpl interactively (in ipython --pylab) to plot 2d data on basemaps using pcolormesh. When moving the mouse over the map, I can see x,y coordinates being displayed in the bottom right of the plot window. What would be more interesting for me is the value of the pcolomesh'ed data variable at the point where the mouse cursor is. Any way I can get this information? Cheers, Andreas. |
|
From: Matthew D B. <mat...@gm...> - 2013-02-01 16:38:27
|
Dear all Has anyone attempted to use matplotlib within a mac (cocoa) application before (e.g. using PyRun_SimpleFile or PyRun_SimpleString)? I can successfully get get a plot to appear in a new window but when closing this window the entire application quits without any error. Looking at the source code, the macosx backend seems to kill the currently running NSApp. Is there a reason for this and is there any way around it? Many thanks! |
|
From: Francesco M. <fra...@gm...> - 2013-02-01 16:32:38
|
2013/2/1 Benjamin Root <ben...@ou...> > > > On Fri, Feb 1, 2013 at 11:04 AM, Jeff Layton <lay...@at...> wrote: > >> Good morning, >> >> I'm been using matplotlib for a while but it's always been very >> simple plots (hey - I'm a simple person). I have a need for some >> "fancier" plots using subplots. >> >> I want to have 3 charts one above the other with a single set of >> x-axis labels on the bottom subplot that works for all three charts. >> I'd also like to put a legend outside the set of three charts - either >> to the top right or horizontally along the bottom. >> >> I've been reading a number of links and nothing really works. >> Most everything is around pylab and I'm using just straight >> matploblib. I hate to say it, but I need to have the solution and >> I'm looking for some newbie help. One of the frustrating aspects >> is I need to make sure it works for version 0.91 :( >> >> I'm attaching a simple example script that shows the plots >> as I currently have achieved them. Apologies for any bad coding. >> Just in case the attachment doesn't make it through the code is >> below. >> >> Thanks! >> >> Jeff >> >> >> > I don't know when it was introduced, but ax.label_outer() (called on each > axes object) can help you with the axis labeling. If that works, we can > then tackle legend placement. > if it does not work should be possible to do for ax1 and ax2 [t.set_visible(False) for t in ax.get_xticklabels()] Francesco > Ben Root > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Benjamin R. <ben...@ou...> - 2013-02-01 16:15:55
|
On Fri, Feb 1, 2013 at 11:04 AM, Jeff Layton <lay...@at...> wrote: > Good morning, > > I'm been using matplotlib for a while but it's always been very > simple plots (hey - I'm a simple person). I have a need for some > "fancier" plots using subplots. > > I want to have 3 charts one above the other with a single set of > x-axis labels on the bottom subplot that works for all three charts. > I'd also like to put a legend outside the set of three charts - either > to the top right or horizontally along the bottom. > > I've been reading a number of links and nothing really works. > Most everything is around pylab and I'm using just straight > matploblib. I hate to say it, but I need to have the solution and > I'm looking for some newbie help. One of the frustrating aspects > is I need to make sure it works for version 0.91 :( > > I'm attaching a simple example script that shows the plots > as I currently have achieved them. Apologies for any bad coding. > Just in case the attachment doesn't make it through the code is > below. > > Thanks! > > Jeff > > > I don't know when it was introduced, but ax.label_outer() (called on each axes object) can help you with the axis labeling. If that works, we can then tackle legend placement. Ben Root |
|
From: Jeff L. <lay...@at...> - 2013-02-01 16:05:42
|
Good morning,
I'm been using matplotlib for a while but it's always been very
simple plots (hey - I'm a simple person). I have a need for some
"fancier" plots using subplots.
I want to have 3 charts one above the other with a single set of
x-axis labels on the bottom subplot that works for all three charts.
I'd also like to put a legend outside the set of three charts - either
to the top right or horizontally along the bottom.
I've been reading a number of links and nothing really works.
Most everything is around pylab and I'm using just straight
matploblib. I hate to say it, but I need to have the solution and
I'm looking for some newbie help. One of the frustrating aspects
is I need to make sure it works for version 0.91 :(
I'm attaching a simple example script that shows the plots
as I currently have achieved them. Apologies for any bad coding.
Just in case the attachment doesn't make it through the code is
below.
Thanks!
Jeff
#!/usr/bin/python
#
import matplotlib.pyplot as plt;
if __name__ == '__main__':
x=[0.0, 1.0, 2.0, 3.0, 4.0];
y1 = [11.97, 1.01, 2.97, 1.0, 1.01];
y2 = [3.55, 1.01, 3.96, 1.0, 0.0];
y3 = [0.29, 0.0, 0.0, 0.0, 0.0];
fig = plt.figure();
ax1 = fig.add_subplot(311);
ax2 = fig.add_subplot(312, sharex=ax1);
ax3 = fig.add_subplot(313, sharex=ax1);
ax1.plot(x, y1, "ro-");
ax2.plot(x, y2, "bo-");
ax3.plot(x, y3, "go-");
ax1.grid();
ax2.grid();
ax3.grid();
plt.show();
# end main
|
|
From: Jae-Joon L. <lee...@gm...> - 2013-02-01 04:30:40
|
FancyArrowPatch behaves quite differently from normal patches. Most importantly, the path must be reevaluated during the drawing time, so a normal PatchCollection, which evaluate the paths during the instance creation, won't work. i.e., you need a new Collection class. Below is a very incomplete implementation of FancyArrowPatchCollection, just for a demonstration purpose. And I recommend you to open a wishlist ticket at the issue tracker (https://github.com/matplotlib/matplotlib/issues ). Regards, -JJ class FancyArrowPatchCollection(PatchCollection): def set_paths(self, patches): self._patches = patches def get_paths(self): paths = [] for p in self._patches: p.set_transform(self.get_transform()) _path, fillable = p.get_path_in_displaycoord() paths.extend(_path) return paths def _prepare_points(self): import matplotlib.transforms as mtransforms transform, transOffset, offsets, paths = PatchCollection._prepare_points(self) return mtransforms.IdentityTransform(), transOffset, offsets, paths On Thu, Jan 31, 2013 at 6:33 AM, Skipper Seabold <jss...@gm...>wrote: > Hi, > > Trying to figure out why these two do not create the same plot. Bug or > user error? > > import matplotlib.pyplot as plt > from matplotlib.patches import FancyArrowPatch > from matplotlib.collections import PatchCollection > > def correct_patch(pos): > fig, ax = plt.subplots() > for src, dst in pos: > arrow = FancyArrowPatch(posA=src, posB=dst, > color='k', arrowstyle='-|>', > mutation_scale=30, connectionstyle="arc3") > ax.add_patch(arrow) > return fig > > def patch_collection_problem(pos): > fig, ax = plt.subplots() > pos = [[(.5, .5), (.25, .25)], > [(.1, .5), (.2, .75)]] > arrows = [] > for src, dst in pos: > arrows.append(FancyArrowPatch(posA=src, posB=dst, > color='k', arrowstyle='-|>', > mutation_scale=30, connectionstyle="arc3")) > collection = PatchCollection(arrows, match_original=True) > > ax.add_collection(collection, autolim=False) > return fig > > pos = [[(.5, .5), (.25, .25)], > [(.1, .5), (.2, .75)]] > > correct_patch(pos) > patch_collection_problem(pos) > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Alan G I. <ala...@gm...> - 2013-01-31 19:12:43
|
On 1/31/2013 12:55 PM, Benjamin Root wrote: > I was submitting an article to an IEEE journal once. IEEE's submission process for images gives back fairly useful error messages, and it told me > that my images (that I generated from matplotlib) needed to be in CMYK format. I had access to Adobe Illustrator on my wife's computer, and used its > tools to convert those files to CMYK, and resubmitted it to IEEE's submission page. The error message I got back? "Images need to be in RGB format" http://matplotlib.org/users/whats_new.html#pgf-tikz-backend fwiw, Alan Isaac |
|
From: Benjamin R. <ben...@ou...> - 2013-01-31 17:55:49
|
On Thu, Jan 31, 2013 at 12:08 PM, Dieter <die...@ed...>wrote: > > > Is there really no practical way to do this? How do others convert RGB > plots > to CMYK? (Importing my data into Matlab and plotting them there cannot be > the only possibility!) > > Funny story about that. I was submitting an article to an IEEE journal once. IEEE's submission process for images gives back fairly useful error messages, and it told me that my images (that I generated from matplotlib) needed to be in CMYK format. I had access to Adobe Illustrator on my wife's computer, and used its tools to convert those files to CMYK, and resubmitted it to IEEE's submission page. The error message I got back? "Images need to be in RGB format" I forget what I did to resolve this problem (I think I did some funky eps-->ps-->pdf-->eps thing, I don't remember), but what I submitted was certainly RGB, so, go figure... Cheers! Ben Root |
|
From: Dieter <die...@ed...> - 2013-01-31 17:08:41
|
Thanks everybody for the input. As I see the answer is no, but it could be implemented. I did an extensive search, but I even struggle to find a good and practical solution how to convert a VECTORPLOT RGB to CMYK on a linux system. (One way I often found would be the Adobe suits, which I do not have.) I gave mpl_ps_cmyk a go, but execution failed, and the page looks dated. Furthermore, Adobes seems to provide ICCs only for Windows and Mac, but not for Linux. ImageMagick rasterizes the figure, the same with GIMP. I agree that this should be done on the publisher's side, but as a matter of fact it is the requirement of some journals. Is there really no practical way to do this? How do others convert RGB plots to CMYK? (Importing my data into Matlab and plotting them there cannot be the only possibility!) Thanks everybody again, much appreciated! Dieter -- View this message in context: http://matplotlib.1069221.n5.nabble.com/CMYK-tp40352p40379.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Mads I. <mad...@gm...> - 2013-01-31 08:04:25
|
On 01/30/2013 08:02 PM, Benjamin Root wrote:
>
>
> On Wed, Jan 30, 2013 at 1:46 PM, Mads Ipsen <mad...@gm...
> <mailto:mad...@gm...>> wrote:
>
> On 01/30/2013 05:03 PM, Benjamin Root wrote:
>>
>>
>> On Tue, Jan 29, 2013 at 5:12 PM, Mads Ipsen <mad...@gm...
>> <mailto:mad...@gm...>> wrote:
>>
>> Hi,
>>
>> I spend some time writing up the question below on
>> Stackoverflow which immediately was closed as a duplicate of
>> other posts. To my best knowledge, these posts did not answer
>> my questions - so I'll try my luck here instead:
>>
>> I am using the qt backengine for setting up a QWidget that
>> embeds a matplotlib scene. When the widget is closed it
>> appears that many of the matplotlib objects that were part of
>> the plot still are alive in Python space.
>>
>> My question is basically the following: What actions should I
>> take to clean up the figure and axes objects etc. that were
>> part of the plot widget? The qt backend comes with a figure
>> manager, but it appears a little unclear how it should be used.
>>
>> I have attached a small unit test example that sets up a
>> plot. When the plot appears, just close it, and the test will
>> garbage collects the plot, and then display info of the
>> matplotlib objects that are still alive in Python space.
>> Clearly both the path of the plot, and several Bbox objects
>> are still referenced.
>>
>> Our current unit test suite contains almost 10000 GUI tests
>> and its imperative that proper object space clean up is done
>> after each test. Any help is much appreciated.
>>
>> Best regards,
>>
>> Mads
>>
>>
>> Would "fig.clf()" do what you need?
>>
>> Ben Root
>>
> Thanks for the feedback.
>
> The trick is to get this done automatically when the widget is
> closed. If you look in backend_qt4.py in the constructor of
> FigureCanvasQT you'll find
>
> QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'),
> self.close_event)
>
> which should perform the steps below when close_event is called
>
> event = CloseEvent(s, self, guiEvent=guiEvent)
> self.callbacks.process(s, event)
>
> If I insert print statements, the signal is ignored with
> matplotlib 1.1.0, but called with 1.2.0 (which uses a lambda
> function in the above connection).But inspecting pythons objects
> after the close() method is called on the widget, it seems that -
> at least - the paths associated with plot actually still exist.
>
> So I'm just a bit worried if there already is existing
> functionality in the FigureCanvasQTAgg object that can do these
> things for me. And if so, how to use them?
>
> Best regards,
>
> Mads
>
>
> Actually, now I am starting to recall a bug fix that came shortly
> after the 1.2.0 release related to properly setting up the destruction
> signal of the QT figure object. Could you test your code-base with
> the maintenance branch (1.2.x)? or master?
>
> Cheers!
> Ben Root
>
Hi,
I attach log files from running my setup 'plot.py' with 1.1.0, 1.2.0,
and master. To my judgement - if an automated memory clean-up is handled
by the FigureCanvasQTAgg class - I must be abusing the usage of the
class, since all logs still show the presence of paths, labels, bbox's, etc.
Also notice that log-1.2.0 show the presence of a path with hundreds of
data points, which are not present in the other logs.
Best regards,
Mads
--
+-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: mad...@gm... |
+----------------------+------------------------------+
|
|
From: Jae-Joon L. <lee...@gm...> - 2013-01-31 05:08:12
|
I agree with Eric that what we need is a backend that support CMYK color space. But matplotlib may need to provide some framework for handling the color profiles etc. My limited experience with ps_myck backend ( https://github.com/leejjoon/mpl_ps_cmyk) suggests that, as far as matplotlib provide some framework for color conversion, implementing/modifying a backend to support cmyk should not be difficult. So, yes, we need someone to write a MEP. Regards, -JJ On Thu, Jan 31, 2013 at 4:30 AM, Eric Firing <ef...@ha...> wrote: > On 2013/01/30 9:13 AM, Paul Kuin wrote: > > For what it's worth. > > > > While the RGB system is native to monitor devices, since they produce > > light of certain colours, CMYK is the colour system of printer > > materials etc. since they absorb the colours, but reflect those we > > see. That means designs must be made in CMYK for pronter materials > > and in RGB for our devices. The response of each medium or device is > > different. RGB will have part of the colour space not accessible in > > some devices, while in printed materials it is different again. The > > basic thing is colour space, while RGB and CMYK can be seen as a map. > > In the real world you have to look at the product to see if the > > colours come out right. > > > > Not sure what to make of any implementation of this, but a simple > > mapping should not be impossible. > > Granted, a mapping within the intersection of the two spaces > respectively accessibly to RGB and CMYK is possible, but I think it > makes more sense to do it as a separate operation on the ps or pdf file > than to try to build it into mpl. If it were to be built in, I think it > would have to be bolted onto the ps and pdf backends. I suspect that > the alpha channel will make this quite complicated, much more so than a > simple mapping; it will require an intermediate rendering step. > > Eric > > > > > Cheers, > > > > Paul > > > > On Wed, Jan 30, 2013 at 6:38 PM, Eric Firing <ef...@ha...> wrote: > >> On 2013/01/30 6:43 AM, Michael Droettboom wrote: > >>> We don't currently have any support -- and we're still struggling in > >>> certain areas supporting RGBA consistently across the system. > >>> > >>> I think this would take someone writing a MEP (as a preliminary study > of > >>> all of the changes that would be involved) and then shepherding it > >>> through implementation. > >> > >> My somewhat vague recollection is that CMYK is fundamentally > >> output-device dependent, and therefore it really doesn't make much sense > >> for a plotting library to support it directly. The conversion from RGBA > >> should be made by the publisher, knowing what the output device > >> characteristics are. > >> > >> Eric > >> > >>> > >>> Mike > >>> > >>> On 01/30/2013 11:10 AM, Ignas Anikevičius wrote: > >>>> On 29/01/13 03:37:51 -0800, Dieter wrote: > >>>>> I was wondering if anything changed regarding this within the last > 2.5 years > >>>>> since the last thread. Is there a way to produce CMYK with > matplotlib? > >>>> Hello everybody, > >>>> > >>>> I would be also interested in how to produce CMYK graphics without > >>>> external fiddling. > >>>> > >>>> Cheers, > >>>> Ignas > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: ztftom <zt...@gm...> - 2013-01-31 03:29:58
|
Something wrong with the figure in the gallery: custom_scale_example.py <http://matplotlib.org/examples/api/custom_scale_example.html> It's supposed to be a Mercator scale, but the figure shown is just a linear scale plot.I also attached my plot. <http://matplotlib.1069221.n5.nabble.com/file/n40376/mercator_projection_scale.png> Anyone who could confirm this? Thx! -- View this message in context: http://matplotlib.1069221.n5.nabble.com/custom-scale-example-py-tp40376.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Maria L. <li...@us...> - 2013-01-30 22:53:53
|
Ben, Many thanks! Will try to use shapely package then. Masha -------------------- li...@us... On Jan 30, 2013, at 6:59 AM, Benjamin Root wrote: > > > On Tue, Jan 29, 2013 at 5:55 PM, Maria Liukis <li...@us...> wrote: > Hello, > > I tested the following code on my Mac laptop and our production Linux server both running matplotlib V1.0.1. Both machines observe the same output from the code, so I was wondering if somebody is aware of the problem or if it's some undocumented feature of "pnpoly()" function from matplotlib.nxutils? > > I use matplotlib.nxutils.pnpoly() function from matplotlib to determine if point belongs to the polygon. > The following code: > > >>> import numpy as np > >>> import matplotlib.nxutils as nx > >>> coords = np.array([[4.0, 1.0], [4.0, 4.0], [5.0, 5.0], [6.0, 4.0], [5.0, 0.0]]) > > >>> nx.pnpoly(4.0, 1.0, coords) > 1 > >>> nx.pnpoly(4.0, 4.0, coords) > 1 > >>> nx.pnpoly(5.0, 5.0, coords) > 0 > >>> nx.pnpoly(6.0, 4.0, coords) > 0 > >>> nx.pnpoly(5.0, 0.0, coords) > 0 > > The question is why first two vertexes are considered to be inside of defined polygon, and last 3 vertexes are not? My guess, it's treating the polygon as a semi-open set, and I wonder if it can be changed to make all vertexes inclusive? > > Any help would be greatly appreciated. > > Many thanks, > Masha > > The documentation for pnpoly() for that version states: > > """ > A point on the boundary may be treated as inside or outside. > See `pnpoly <http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_ > """ > > Note that in version 1.2.0, the nxutils module was deprecated. pnpoly() and points_inside_poly() are now merely wrappers around the polygon's implementations of point-testing, which differs from the nxutils' implementation, so you may get slightly different results. > > Do note that the point-testing algorithm in matplotlib was more geared for visualization purposes rather than for strict geometric needs. If you need a more well-behaved point-tester (and faster if the polygon is "prepared"), use the shapely package instead. > > I hope that clears things up! > > Cheers! > Ben Root > |
|
From: Skipper S. <jss...@gm...> - 2013-01-30 21:33:30
|
Hi,
Trying to figure out why these two do not create the same plot. Bug or user
error?
import matplotlib.pyplot as plt
from matplotlib.patches import FancyArrowPatch
from matplotlib.collections import PatchCollection
def correct_patch(pos):
fig, ax = plt.subplots()
for src, dst in pos:
arrow = FancyArrowPatch(posA=src, posB=dst,
color='k', arrowstyle='-|>',
mutation_scale=30, connectionstyle="arc3")
ax.add_patch(arrow)
return fig
def patch_collection_problem(pos):
fig, ax = plt.subplots()
pos = [[(.5, .5), (.25, .25)],
[(.1, .5), (.2, .75)]]
arrows = []
for src, dst in pos:
arrows.append(FancyArrowPatch(posA=src, posB=dst,
color='k', arrowstyle='-|>',
mutation_scale=30, connectionstyle="arc3"))
collection = PatchCollection(arrows, match_original=True)
ax.add_collection(collection, autolim=False)
return fig
pos = [[(.5, .5), (.25, .25)],
[(.1, .5), (.2, .75)]]
correct_patch(pos)
patch_collection_problem(pos)
|
|
From: Eric F. <ef...@ha...> - 2013-01-30 19:30:55
|
On 2013/01/30 9:13 AM, Paul Kuin wrote: > For what it's worth. > > While the RGB system is native to monitor devices, since they produce > light of certain colours, CMYK is the colour system of printer > materials etc. since they absorb the colours, but reflect those we > see. That means designs must be made in CMYK for pronter materials > and in RGB for our devices. The response of each medium or device is > different. RGB will have part of the colour space not accessible in > some devices, while in printed materials it is different again. The > basic thing is colour space, while RGB and CMYK can be seen as a map. > In the real world you have to look at the product to see if the > colours come out right. > > Not sure what to make of any implementation of this, but a simple > mapping should not be impossible. Granted, a mapping within the intersection of the two spaces respectively accessibly to RGB and CMYK is possible, but I think it makes more sense to do it as a separate operation on the ps or pdf file than to try to build it into mpl. If it were to be built in, I think it would have to be bolted onto the ps and pdf backends. I suspect that the alpha channel will make this quite complicated, much more so than a simple mapping; it will require an intermediate rendering step. Eric > > Cheers, > > Paul > > On Wed, Jan 30, 2013 at 6:38 PM, Eric Firing <ef...@ha...> wrote: >> On 2013/01/30 6:43 AM, Michael Droettboom wrote: >>> We don't currently have any support -- and we're still struggling in >>> certain areas supporting RGBA consistently across the system. >>> >>> I think this would take someone writing a MEP (as a preliminary study of >>> all of the changes that would be involved) and then shepherding it >>> through implementation. >> >> My somewhat vague recollection is that CMYK is fundamentally >> output-device dependent, and therefore it really doesn't make much sense >> for a plotting library to support it directly. The conversion from RGBA >> should be made by the publisher, knowing what the output device >> characteristics are. >> >> Eric >> >>> >>> Mike >>> >>> On 01/30/2013 11:10 AM, Ignas Anikevičius wrote: >>>> On 29/01/13 03:37:51 -0800, Dieter wrote: >>>>> I was wondering if anything changed regarding this within the last 2.5 years >>>>> since the last thread. Is there a way to produce CMYK with matplotlib? >>>> Hello everybody, >>>> >>>> I would be also interested in how to produce CMYK graphics without >>>> external fiddling. >>>> >>>> Cheers, >>>> Ignas |
|
From: Paul K. <np...@gm...> - 2013-01-30 19:14:06
|
For what it's worth. While the RGB system is native to monitor devices, since they produce light of certain colours, CMYK is the colour system of printer materials etc. since they absorb the colours, but reflect those we see. That means designs must be made in CMYK for pronter materials and in RGB for our devices. The response of each medium or device is different. RGB will have part of the colour space not accessible in some devices, while in printed materials it is different again. The basic thing is colour space, while RGB and CMYK can be seen as a map. In the real world you have to look at the product to see if the colours come out right. Not sure what to make of any implementation of this, but a simple mapping should not be impossible. Cheers, Paul On Wed, Jan 30, 2013 at 6:38 PM, Eric Firing <ef...@ha...> wrote: > On 2013/01/30 6:43 AM, Michael Droettboom wrote: >> We don't currently have any support -- and we're still struggling in >> certain areas supporting RGBA consistently across the system. >> >> I think this would take someone writing a MEP (as a preliminary study of >> all of the changes that would be involved) and then shepherding it >> through implementation. > > My somewhat vague recollection is that CMYK is fundamentally > output-device dependent, and therefore it really doesn't make much sense > for a plotting library to support it directly. The conversion from RGBA > should be made by the publisher, knowing what the output device > characteristics are. > > Eric > >> >> Mike >> >> On 01/30/2013 11:10 AM, Ignas Anikevičius wrote: >>> On 29/01/13 03:37:51 -0800, Dieter wrote: >>>> I was wondering if anything changed regarding this within the last 2.5 years >>>> since the last thread. Is there a way to produce CMYK with matplotlib? >>> Hello everybody, >>> >>> I would be also interested in how to produce CMYK graphics without >>> external fiddling. >>> >>> Cheers, >>> Ignas >>> >>> ------------------------------------------------------------------------------ >>> Everyone hates slow websites. So do we. >>> Make your web apps faster with AppDynamics >>> Download AppDynamics Lite for free today: >>> http://p.sf.net/sfu/appdyn_d2d_jan >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_jan >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * * Dr. N.P.M. Kuin (n....@uc...) phone +44-(0)1483 (prefix) -204256 (work) -276110 (home) mobile +44(0)7806985366 skype ID: npkuin Mullard Space Science Laboratory – University College London – Holmbury St Mary – Dorking – Surrey RH5 6NT– U.K. |
|
From: Benjamin R. <ben...@ou...> - 2013-01-30 19:03:07
|
On Wed, Jan 30, 2013 at 1:46 PM, Mads Ipsen <mad...@gm...> wrote:
> On 01/30/2013 05:03 PM, Benjamin Root wrote:
>
>
>
> On Tue, Jan 29, 2013 at 5:12 PM, Mads Ipsen <mad...@gm...> wrote:
>
>> Hi,
>>
>> I spend some time writing up the question below on Stackoverflow which
>> immediately was closed as a duplicate of other posts. To my best knowledge,
>> these posts did not answer my questions - so I'll try my luck here instead:
>>
>> I am using the qt backengine for setting up a QWidget that embeds a
>> matplotlib scene. When the widget is closed it appears that many of the
>> matplotlib objects that were part of the plot still are alive in Python
>> space.
>>
>> My question is basically the following: What actions should I take to
>> clean up the figure and axes objects etc. that were part of the plot
>> widget? The qt backend comes with a figure manager, but it appears a little
>> unclear how it should be used.
>>
>> I have attached a small unit test example that sets up a plot. When the
>> plot appears, just close it, and the test will garbage collects the plot,
>> and then display info of the matplotlib objects that are still alive in
>> Python space. Clearly both the path of the plot, and several Bbox objects
>> are still referenced.
>>
>> Our current unit test suite contains almost 10000 GUI tests and its
>> imperative that proper object space clean up is done after each test. Any
>> help is much appreciated.
>>
>> Best regards,
>>
>> Mads
>>
>
> Would "fig.clf()" do what you need?
>
> Ben Root
>
> Thanks for the feedback.
>
> The trick is to get this done automatically when the widget is closed. If
> you look in backend_qt4.py in the constructor of FigureCanvasQT you'll find
>
> QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'),
> self.close_event)
>
> which should perform the steps below when close_event is called
>
> event = CloseEvent(s, self, guiEvent=guiEvent)
> self.callbacks.process(s, event)
>
> If I insert print statements, the signal is ignored with matplotlib 1.1.0,
> but called with 1.2.0 (which uses a lambda function in the above
> connection). But inspecting pythons objects after the close() method is
> called on the widget, it seems that - at least - the paths associated with
> plot actually still exist.
>
> So I'm just a bit worried if there already is existing functionality in
> the FigureCanvasQTAgg object that can do these things for me. And if so,
> how to use them?
>
> Best regards,
>
> Mads
>
>
Actually, now I am starting to recall a bug fix that came shortly after the
1.2.0 release related to properly setting up the destruction signal of the
QT figure object. Could you test your code-base with the maintenance
branch (1.2.x)? or master?
Cheers!
Ben Root
|
|
From: Jonathan S. <js...@cf...> - 2013-01-30 18:51:00
|
Hi Darhas, How did you invert the axis? I find that it works for me to do: ax.plot(x1,y1) ax2 = ax.twiny() ax2.plot(x2,y2) ax2.invert_xaxis() Jon On Wed, 2013-01-30 at 16:45 +0000, Dharhas Pothina wrote: > Hi All, > > > I'm trying to recreate some plots from a old 1970's era report. This > is a single plot with an elevation-capacity curve and an > elevation-area curve overlaid on top of each other. > > > The plot needs to have a shared y-axis (elevation). The > elevation-capacity curve has an x-axis along the bottom that goes left > to right. The elevation-area curve has a x-axis with a different scale > that goes right to left along the top. > > > I've tried using twiny and reversing the second x axis but that ends > up reversing both. Any help would be appreciated. I've attached a low > res image of one of the original plots for reference. > > > Thanks, > > > - dharhas -- ______________________________________________________________ Jonathan D. Slavin Harvard-Smithsonian CfA js...@cf... 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA ______________________________________________________________ |
|
From: Mads I. <mad...@gm...> - 2013-01-30 18:46:30
|
On 01/30/2013 05:03 PM, Benjamin Root wrote:
>
>
> On Tue, Jan 29, 2013 at 5:12 PM, Mads Ipsen <mad...@gm...
> <mailto:mad...@gm...>> wrote:
>
> Hi,
>
> I spend some time writing up the question below on Stackoverflow
> which immediately was closed as a duplicate of other posts. To my
> best knowledge, these posts did not answer my questions - so I'll
> try my luck here instead:
>
> I am using the qt backengine for setting up a QWidget that embeds
> a matplotlib scene. When the widget is closed it appears that many
> of the matplotlib objects that were part of the plot still are
> alive in Python space.
>
> My question is basically the following: What actions should I take
> to clean up the figure and axes objects etc. that were part of the
> plot widget? The qt backend comes with a figure manager, but it
> appears a little unclear how it should be used.
>
> I have attached a small unit test example that sets up a plot.
> When the plot appears, just close it, and the test will garbage
> collects the plot, and then display info of the matplotlib objects
> that are still alive in Python space. Clearly both the path of the
> plot, and several Bbox objects are still referenced.
>
> Our current unit test suite contains almost 10000 GUI tests and
> its imperative that proper object space clean up is done after
> each test. Any help is much appreciated.
>
> Best regards,
>
> Mads
>
>
> Would "fig.clf()" do what you need?
>
> Ben Root
>
Thanks for the feedback.
The trick is to get this done automatically when the widget is closed.
If you look in backend_qt4.py in the constructor of FigureCanvasQT
you'll find
QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'),
self.close_event)
which should perform the steps below when close_event is called
event = CloseEvent(s, self, guiEvent=guiEvent)
self.callbacks.process(s, event)
If I insert print statements, the signal is ignored with matplotlib
1.1.0, but called with 1.2.0 (which uses a lambda function in the above
connection).But inspecting pythons objects after the close() method is
called on the widget, it seems that - at least - the paths associated
with plot actually still exist.
So I'm just a bit worried if there already is existing functionality in
the FigureCanvasQTAgg object that can do these things for me. And if so,
how to use them?
Best regards,
Mads
--
+-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: mad...@gm... |
+----------------------+------------------------------+
|
|
From: Eric F. <ef...@ha...> - 2013-01-30 18:38:30
|
On 2013/01/30 6:43 AM, Michael Droettboom wrote: > We don't currently have any support -- and we're still struggling in > certain areas supporting RGBA consistently across the system. > > I think this would take someone writing a MEP (as a preliminary study of > all of the changes that would be involved) and then shepherding it > through implementation. My somewhat vague recollection is that CMYK is fundamentally output-device dependent, and therefore it really doesn't make much sense for a plotting library to support it directly. The conversion from RGBA should be made by the publisher, knowing what the output device characteristics are. Eric > > Mike > > On 01/30/2013 11:10 AM, Ignas Anikevičius wrote: >> On 29/01/13 03:37:51 -0800, Dieter wrote: >>> I was wondering if anything changed regarding this within the last 2.5 years >>> since the last thread. Is there a way to produce CMYK with matplotlib? >> Hello everybody, >> >> I would be also interested in how to produce CMYK graphics without >> external fiddling. >> >> Cheers, >> Ignas >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_jan >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |