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: Matt T. <mat...@gm...> - 2013-08-29 17:01:49
|
(Replying to the list, rather than just George) On Aug 29, 2013 8:18 AM, "Matt Terry" <mat...@gm...> wrote: > > I have 15/17 variants working. each pulling binaries/source from some combination of macports/brew/python.org/pip on python 2.6, 2.7, 3.2, and 3.3. > > https://travis-ci.org/mrterry/mpl_on_travis_mac/builds/10733852 > > I need to add python27 and python33 variants that install XQuartz. Other than that, are there any builds that should be added? For reference, > > python.org 27 / pip numpy > python.org 27 / numpy dmg > python.org 33 / pip numpy (no official python3 numpy installer) > (all built with static versions of libpng/freetype) > > system python + brew dependencies > system python + brew dependencies* > > brew python27 > brew python27* > > brew python33 > brew python33* > > macports py26 > macports py27 > macports py32 > macports py33 > macports py26* > macports py27* > macports py32* > macports py33* > > * = virtual envs. python & c dependencies installed from package manager; macports, numpy from macports. --with-site-packages > > > I'm having a strange installation issue involving dateutil on python 3.3 (only). It is a bytes vs unicode (fight!) that manifests on installation. I can't reproduce the issue on my machine, but it may have something to do with dateutil v2.1. Anyone seen something like this? installing dateutil via macports cleans up the issue (it installs 2.0, i think). > > -matt > > > > > On Thu, Aug 29, 2013 at 4:47 AM, George Nurser <gn...@gm...> wrote: >> >> It might be useful to see how macports does it -- their builds have always worked for me. >> >> George Nurser. >> >> >> On 23 August 2013 18:53, Chris Barker - NOAA Federal < chr...@no...> wrote: >>> >>> On Fri, Aug 23, 2013 at 8:14 AM, Matt Terry <mat...@gm...> wrote: >>> > I'm banging away at installing MPL on top of python.org's python. >>> >>> This is why binary installers are good idea! >>> >>> > the libfreetype/freetype issue. >>> >>> yeah, that's kind of ugly....and where is doesn't "just work" for me... >>> >>> > 1) install libpng[1] and freetype[2] from source >>> >>> libpng and freetype are different, though install from source may be >>> the way to go: >>> >>> libpng is there, but is not properly installed, I'm not sure it's got >>> the header for the same version as the lib, and libpng-config is >>> either not there or not for the right version or somethign ugly. It >>> look, form messages at build time, that someone has hacked some code >>> into the MPL build that figures all that out, but for other stuff I'm >>> doing, I just punt and build libpng -- that's pretty straighforward, >>> at least. But teh solution in the MPL code now seems to work. >>> >>> > 2) install XQuartz[3] and twiddle /opt/X11, /usr/X11 (per Russell's >>> > directions[4]) so MPL finds XQuartz's libpng/freetype >>> >>> I _think_ that OS-X now ships with X11, which has freetype (though >>> installed weirdly once again...) we certainly should NOT expect people >>> to install anything big to build MPL, and binaries should not depend >>> on anything not shipped by Apple by default. >>> >>> According to Russell, you do need to install something, so I think that's out. >>> >>> > 4) create the MPL binary installer and use that >>> >>> That's what most people should do -- but one of us needs to build it. >>> >>> > Option 1 seems simple-est, but installing freetype requires more than >>> > ./configure && make && sudo make install. >>> >>> darn. But hopefully we can figure it out. >>> >>> > Option 4: This would require some input from whoever (Gohlke?, Owen?) makes >>> > the binary installers. >>> >>> I think Russell has been doing it for MPL lately. >>> >>> My thoughts: >>> >>> We want to support two user-bases: >>> >>> 1) folks that don't mind a little command line work, and probably need >>> other scientific libs, etc anyway, an want an MPL that runs on their >>> machine: >>> - these folks should use homebrew or macports to build the >>> dependencies (or even hand-compile them). Ideally we have setup.py >>> that will find those libs, and test to see that the builds work once >>> in a while. >>> >>> 2) folks that "just want to use it" and/or want a binary they can >>> re-distribute via py2app, etc. >>> - for these folks, we need to provide binaries. These binaries should: >>> 1) Match the python.org python builds. (probably only the Intel ones now...) >>> 2) statically link the non-sytem libs >>> >>> This has been done for a while, off and on, most recently by Russell, AFAIK. >>> >>> But this is not a problem unique to MPL. All sorts of python packages >>> need this, and only some of the package maintainers do it (well). >>> Also, a bunch of packages require the same dependencies (i.e. PIL and >>> MPL both need png and freetype) >>> >>> So, rather than re-inventing the wheel over and over again, It would >>> be great to have a central repository where we can develop build >>> scripts, etc that share an infrustructure for building these binaries. >>> >>> I've started one: >>> >>> https://github.com/MacPython/mac-builds >>> >>> there is not much there, only a couple things I'm working on at the >>> moment (netCDF4, which is of interest to scipy folks, and py_gd, which >>> is my own simple drawing lib, that no one else uses (yet?) >>> >>> If anyone wants to join the project let me know -- if I know you from >>> your work with this community, I'll gladly add you. >>> >>> I'm using the gattai build system: >>> (https://sourceforge.net/projects/gattai/). I decided to do that, as I >>> was sick of re-writing essentially the same build scripts, and I kept >>> adding features to mine that would have resulted in re-implementing >>> gattai anyway. I've been hacking at gattai, and its author is quite >>> open to moving it forward. >>> >>> That being said, there is no reason that we need to use the same build >>> system -- we could easily have custom build scripts for a project, and >>> still have it share the dependencies. >>> >>> I was planning on getting it all further along before announcing the >>> project and looking for help, but since is came up... >>> >>> -Chris >>> >>> -- >>> >>> Christopher Barker, Ph.D. >>> Oceanographer >>> >>> Emergency Response Division >>> NOAA/NOS/OR&R (206) 526-6959 voice >>> 7600 Sand Point Way NE (206) 526-6329 fax >>> Seattle, WA 98115 (206) 526-6317 main reception >>> >>> Chr...@no... >>> >>> ------------------------------------------------------------------------------ >>> Introducing Performance Central, a new site from SourceForge and >>> AppDynamics. Performance Central is your source for news, insights, >>> analysis and resources for efficient Application Performance Management. >>> Visit us today! >>> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> ------------------------------------------------------------------------------ >> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! >> Discover the easy way to master current and previous Microsoft technologies >> and advance your career. Get an incredible 1,500+ hours of step-by-step >> tutorial videos with LearnDevNow. Subscribe today and save! >> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
|
From: George N. <gn...@gm...> - 2013-08-29 11:47:27
|
It might be useful to see how macports does it -- their builds have always worked for me. George Nurser. On 23 August 2013 18:53, Chris Barker - NOAA Federal <chr...@no...>wrote: > On Fri, Aug 23, 2013 at 8:14 AM, Matt Terry <mat...@gm...> wrote: > > I'm banging away at installing MPL on top of python.org's python. > > This is why binary installers are good idea! > > > the libfreetype/freetype issue. > > yeah, that's kind of ugly....and where is doesn't "just work" for me... > > > 1) install libpng[1] and freetype[2] from source > > libpng and freetype are different, though install from source may be > the way to go: > > libpng is there, but is not properly installed, I'm not sure it's got > the header for the same version as the lib, and libpng-config is > either not there or not for the right version or somethign ugly. It > look, form messages at build time, that someone has hacked some code > into the MPL build that figures all that out, but for other stuff I'm > doing, I just punt and build libpng -- that's pretty straighforward, > at least. But teh solution in the MPL code now seems to work. > > > 2) install XQuartz[3] and twiddle /opt/X11, /usr/X11 (per Russell's > > directions[4]) so MPL finds XQuartz's libpng/freetype > > I _think_ that OS-X now ships with X11, which has freetype (though > installed weirdly once again...) we certainly should NOT expect people > to install anything big to build MPL, and binaries should not depend > on anything not shipped by Apple by default. > > According to Russell, you do need to install something, so I think that's > out. > > > 4) create the MPL binary installer and use that > > That's what most people should do -- but one of us needs to build it. > > > Option 1 seems simple-est, but installing freetype requires more than > > ./configure && make && sudo make install. > > darn. But hopefully we can figure it out. > > > Option 4: This would require some input from whoever (Gohlke?, Owen?) > makes > > the binary installers. > > I think Russell has been doing it for MPL lately. > > My thoughts: > > We want to support two user-bases: > > 1) folks that don't mind a little command line work, and probably need > other scientific libs, etc anyway, an want an MPL that runs on their > machine: > - these folks should use homebrew or macports to build the > dependencies (or even hand-compile them). Ideally we have setup.py > that will find those libs, and test to see that the builds work once > in a while. > > 2) folks that "just want to use it" and/or want a binary they can > re-distribute via py2app, etc. > - for these folks, we need to provide binaries. These binaries should: > 1) Match the python.org python builds. (probably only the Intel ones > now...) > 2) statically link the non-sytem libs > > This has been done for a while, off and on, most recently by Russell, > AFAIK. > > But this is not a problem unique to MPL. All sorts of python packages > need this, and only some of the package maintainers do it (well). > Also, a bunch of packages require the same dependencies (i.e. PIL and > MPL both need png and freetype) > > So, rather than re-inventing the wheel over and over again, It would > be great to have a central repository where we can develop build > scripts, etc that share an infrustructure for building these binaries. > > I've started one: > > https://github.com/MacPython/mac-builds > > there is not much there, only a couple things I'm working on at the > moment (netCDF4, which is of interest to scipy folks, and py_gd, which > is my own simple drawing lib, that no one else uses (yet?) > > If anyone wants to join the project let me know -- if I know you from > your work with this community, I'll gladly add you. > > I'm using the gattai build system: > (https://sourceforge.net/projects/gattai/). I decided to do that, as I > was sick of re-writing essentially the same build scripts, and I kept > adding features to mine that would have resulted in re-implementing > gattai anyway. I've been hacking at gattai, and its author is quite > open to moving it forward. > > That being said, there is no reason that we need to use the same build > system -- we could easily have custom build scripts for a project, and > still have it share the dependencies. > > I was planning on getting it all further along before announcing the > project and looking for help, but since is came up... > > -Chris > > -- > > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chr...@no... > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: vwf <vw...@vu...> - 2013-08-29 07:24:48
|
On Wed, Aug 28, 2013 at 06:39:26PM +0200, vwf wrote: > Hello, > > I would like to create a surface with a color provided by an independent > variable. Got something working: import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter no=100 #======================================== # color trick to draw with varying alpha # http://matplotlib.1069221.n5.nabble.com/scatter-plot-individual-alpha-values-td21106.html #======================================== from matplotlib.colors import LinearSegmentedColormap class LinearColormap(LinearSegmentedColormap): def __init__(self, name, segmented_data, index=None, **kwargs): if index is None: # If index not given, RGB colors are evenly-spaced in # colormap. index = np.linspace(0, 1, len(segmented_data['red'])) for key, value in segmented_data.iteritems(): # Combine color index with color values. segmented_data[key] = zip(index, value) segmented_data = dict((key, [(x, y, y) for x, y in value]) for key, value in segmented_data.iteritems()) LinearSegmentedColormap.__init__(self, name, segmented_data, **kwargs) color_spec = {'blue': [0.0, 0.0], 'green': [1.0, 0.0], 'red': [0.0, 1.0], 'alpha': [0.1, 1.0]} alpha_color = LinearColormap('alpha_color', color_spec) #========================================== fig = plt.figure() ax = fig.gca(projection = '3d') x = np.linspace(-5,5,no) y = np.linspace(-5,5,no) x,y = np.meshgrid(x,y) R = np.sqrt(x**2 + y**2) z = np.sin(R) D = np.sqrt((x-5)**2 + (y-5)**2) c=np.zeros(shape=(no,no),dtype=object) for i in range(no): for j in range(no): c[i,j]=alpha_color(D[i,i]/15) surf = ax.plot_surface(x, y, z, facecolors=c, rstride = 1, cstride = 1, linewidth = 0) ax.set_zlim3d(-2, 2) plt.show() |
|
From: vwf <vw...@vu...> - 2013-08-28 16:39:34
|
Hello,
I would like to create a surface with a color provided by an independent
variable. The shape is defined by a matrix with the z-values. The
color is a matrix of identical shape with floats. Can this be done?
My experiment code is incomplete: I could not write anything useful. Can
onyone help me making it work?
Thank you
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
no=100
cdict = {'red': ((0.0, 0.0, 0.0),
(15.0, 1.0, 1.0)),
'green': ((0.0, 0.0, 0.0),
(15.0, 0.0, 0.0)),
'blue': ((0.0, 1.0, 1.0),
(15.0, 0.0, 0.0))}
fig = plt.figure()
ax = fig.gca(projection = '3d')
x = np.linspace(-5,5,no)
y = np.linspace(-5,5,no)
x,y = np.meshgrid(x,y)
R = np.sqrt(x**2 + y**2)
z = np.sin(R)
D = np.sqrt((x-5)**2 + (y-5)**2)
#and now I need to map distance D
#making (-5,-5) blue and (5,5) red
c=
surf = ax.plot_surface(x, y, z, facecolors=c, rstride = 1, cstride = 1, cmap = jet, linewidth = 0)
ax.set_zlim3d(-2, 2)
plt.show()
|
|
From: Benjamin I. <bab...@go...> - 2013-08-28 09:22:03
|
Hi,
I'm currently working on my master thesis, which heavily involves
creating plots and images. I recently found out about the pdf_tex
feature of Inkscape, which basically creates a seperate LaTeX file
besides the normal *.pdf output, to store the text. The advantage of
this method is that the text displayed in the included pdf matches
exactly the size of your font in the rest of your document, even when
resizing the image. This is just a brilliant feature as it allows me to
fit the width of the images to my column or textwidth while having the
same font size for all images, it just looks amazing. While this work
pretty well for the images i draw myself, i tried to find a similar
feature for my matplotlib plots. The closest format to pdf_tex i found
was pgf. But i have a major issue with this pgf format. When i resize
the picture in LaTeX it also resizes the font size. Is there a way to
get arround this issue? Guess i could resize the plot in matplotlib to
fit approximately the page width and just include the pgf without
resizing it, but i want a consistent look of all my images/plots in my
thesis. Right now, I don't see any advantage over using just a plain pdf
output using matplotlib, besides using the same font as in the rest of
my document (but using pgf to include my plots / images also takes a lot
more time to compile).
I'm not bound to pgf images, so if there is a vector graphic solution
which let's me keep the same font size no matter how i resize my
picture, I would go with it. I guess i could save the image as a svg and
save it with inkscape to pdf_tex, but as i allready mentioned i have a
lot of images / plots.
I would really appreciate any suggestions.
Regards
Benjamin Isbarn
PS: Excuse my bad english :)
PPS: It doesn't seem to be easy to resize a pgf picture to the textwidth
or columnwidth either (because of the \input statement, right now i'm
using \scalebox{}{}). So an alternative to pgf wouldn't be bad.
|
|
From: Štěpán T. <ste...@se...> - 2013-08-28 09:19:21
|
Hi Chris, " I've used some hacky tricks to get around this, which mostly involve downsampling the image on the fly based on screen resolution. One such effort is at https://github.com/ChrisBeaumont/mpl-modest-image (https://github.com/ChrisBeaumont/mpl-modest-image). " I tried your code for plotting 4kx4k image and it is another significant improvement. Originally it took 300 MB then it was reduced to 190 MB with uint8 type and using your ModestImage class it takes 70-100 MB depending on size of window. That is much better! Best Stepan |
|
From: Štěpán T. <ste...@se...> - 2013-08-28 07:42:15
|
Hi Martin, "Hi, I knw you asked for memory profiling but I could not resist and did CPU profiling on your testcase. I have attached some screenshots and in words: " thanks for these tips about profiling. Stepan |
|
From: Michael D. <md...@st...> - 2013-08-27 19:04:37
|
On 08/27/2013 09:49 AM, Chris Beaumont wrote: > I've been burned by this before as well. MPL stores some intermediate > data products (for example, scaled RGB copies) at full resolution, > even though the final rendered image is downsampled depending on > screen resolution. > > I've used some hacky tricks to get around this, which mostly involve > downsampling the image on the fly based on screen resolution. One such > effort is at https://github.com/ChrisBeaumont/mpl-modest-image. It looks like this wouldn't be too hard to include in matplotlib. I don't think we'd want to change the current behavior, because sometimes its tradeoff curve makes sense, but in other cases, the "modest image" approach also makes sense. It's just a matter of coming up with an API to switch between the two behaviors. Pull request? Cheers, Mike > > If you are loading your arrays from disk, you can also use > memory-mapped arrays -- this prevents you from loading all the data > into RAM, and further cuts down on the footprint. > > cheers, > chris > > > On Tue, Aug 27, 2013 at 6:49 AM, S(te(pán Turek > <ste...@se... <mailto:ste...@se...>> wrote: > > > You could look at whether or not you actually need 64-bit > precision. Often times, 8-bit precision per color channel is > justifiable, even in grayscale. My advice is to play with the > dtype of your array or, as you mentioned, resample. > > > thanks, this helped me significantly, uint8 precision is enough. > > Also, is it needed to keep all images? It sounds to me like > your application will become very resource hungry if you're > going to be displaying several of these 2D images over each > other (and if you don't use transparency, you won't get any > benefit at all from plotting them together). > > > Yes, I need them all . > > To avoid it I am thinking about merging them into one image and > then plot it. > > > Stepan > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance > Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Chris B. <cbe...@cf...> - 2013-08-27 13:49:20
|
I've been burned by this before as well. MPL stores some intermediate data products (for example, scaled RGB copies) at full resolution, even though the final rendered image is downsampled depending on screen resolution. I've used some hacky tricks to get around this, which mostly involve downsampling the image on the fly based on screen resolution. One such effort is at https://github.com/ChrisBeaumont/mpl-modest-image. If you are loading your arrays from disk, you can also use memory-mapped arrays -- this prevents you from loading all the data into RAM, and further cuts down on the footprint. cheers, chris On Tue, Aug 27, 2013 at 6:49 AM, Štěpán Turek <ste...@se...>wrote: > > You could look at whether or not you actually need 64-bit precision. Often > times, 8-bit precision per color channel is justifiable, even in grayscale. > My advice is to play with the dtype of your array or, as you mentioned, > resample. > > > thanks, this helped me significantly, uint8 precision is enough. > > > > Also, is it needed to keep all images? It sounds to me like your > application will become very resource hungry if you're going to be > displaying several of these 2D images over each other (and if you don't use > transparency, you won't get any benefit at all from plotting them together). > > > Yes, I need them all . > > To avoid it I am thinking about merging them into one image and then plot > it. > > > Stepan > > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Štěpán T. <ste...@se...> - 2013-08-27 10:50:04
|
" "" You could look at whether or not you actually need 64-bit precision. Often times, 8-bit precision per color channel is justifiable, even in grayscale. My advice is to play with the dtype of your array or, as you mentioned, resample. " thanks, this helped me significantly, uint8 precision is enough. " Also, is it needed to keep all images? It sounds to me like your application will become very resource hungry if you're going to be displaying several of these 2D images over each other (and if you don't use transparency, you won' t get any benefit at all from plotting them together). " Yes, I need them all . To avoid it I am thinking about merging them into one image and then plot it. Stepan " " |
|
From: Oliver <oli...@gm...> - 2013-08-27 10:26:42
|
Those numbers actually make a lot of sense. For a 4k by 4k 2D array of 64-bit floats, you're using 128MiB of memory, just to store them. Displaying such an array with mpl would take a copy of that and add some objects for housekeeping (on my machine about 150MB to display one such array together with the housekeeping objects). You could look at whether or not you actually need 64-bit precision. Often times, 8-bit precision per color channel is justifiable, even in grayscale. My advice is to play with the dtype of your array or, as you mentioned, resample. Also, is it needed to keep all images? It sounds to me like your application will become very resource hungry if you're going to be displaying several of these 2D images over each other (and if you don't use transparency, you won't get any benefit at all from plotting them together). 2013/8/27 Štěpán Turek <ste...@se...> > Hi, > > > You could, before plotting, sum the different image arrays? Depending on > whether you are plotting RGB(A) images or greyscale images, you could take > the sum of the color channels, or take a weighted average. > > > Yes, I will probably merge the images (RGBA) before plotting. I want to > create more plots and even with this optimization every plot will take 300 > MB... Is there any way how to save some memory? > > > Best > > Stepan > > > |
|
From: Štěpán T. <ste...@se...> - 2013-08-27 08:37:14
|
Hi, " You could, before plotting, sum the different image arrays? Depending on whether you are plotting RGB(A) images or greyscale images, you could take the sum of the color channels, or take a weighted average. " Yes, I will probably merge the images (RGBA) before plotting. I want to create more plots and even with this optimization every plot will take 300 MB... Is there any way how to save some memory? Best Stepan |
|
From: Nicolas M. <nic...@la...> - 2013-08-27 08:28:24
|
Le Lun 26 août 2013 18:21, Goyo a écrit : > 2013/7/19 Nicolas Mailhot <nic...@la...>: >> Le Mer 17 juillet 2013 14:56, Michael Droettboom a écrit : >>> Can you please provide a completely standalone example? The following >>> code has undefined variables etc. >> >> Here it is, I'm afraid this testcase intent is less clear than what I >> pasted previously (I replaced variables with precomputed values) >> >> As shown in the attached png, the bottom tick labels (month names) are >> missing. It worked in matplotlib ≤ 1.2.0 > > I can confirm the issue with 1.2.1 but it works with a recent > development version (output attached) so it must have been fixed at > some point. Thank you very much for the data point, I'll try to get 1.3.0 built on RHEL 6 Regards, -- Nicolas Mailhot |
|
From: Oliver <oli...@gm...> - 2013-08-27 08:14:10
|
You could, before plotting, sum the different image arrays? Depending on whether you are plotting RGB(A) images or greyscale images, you could take the sum of the color channels, or take a weighted average. The method you use here depends strongly on the image type, but it will reduce memory consumption. Just a thought. 2013/8/27 Štěpán Turek <ste...@se...> > Hi, > > I would like to plot multiple overlayed 4096x4096 images in one axes. If I > run this code the plot takes 300 MB of memory: > > import numpy as np > import matplotlib.pyplot as plt > > if __name__ == '__main__': > img = np.zeros((4096, 4096)) > img[100: 300, 100:1500] = 200 > imgplot = plt.imshow(img) > > plt.show() > > And it takes additional 300 MB for every image with this size added into > plot. Is there any way to reduce memory consumption without need of data > resampling? > > My configuration: > Matplotlib 1.2.1 > Numpy 1.7.1 > Ubuntu 13.04 64 bit > > Best > Stepan > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Štěpán T. <ste...@se...> - 2013-08-27 07:56:31
|
Hi, I would like to plot multiple overlayed 4096x4096 images in one axes. If I run this code the plot takes 300 MB of memory: import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': img = np.zeros((4096, 4096)) img[100: 300, 100:1500] = 200 imgplot = plt.imshow(img) plt.show() And it takes additional 300 MB for every image with this size added into plot. Is there any way to reduce memory consumption without need of data resampling? My configuration: Matplotlib 1.2.1 Numpy 1.7.1 Ubuntu 13.04 64 bit Best Stepan |
|
From: Goyo <goy...@gm...> - 2013-08-26 16:21:59
|
2013/7/19 Nicolas Mailhot <nic...@la...>: > Le Mer 17 juillet 2013 14:56, Michael Droettboom a écrit : >> Can you please provide a completely standalone example? The following >> code has undefined variables etc. > > Here it is, I'm afraid this testcase intent is less clear than what I > pasted previously (I replaced variables with precomputed values) > > As shown in the attached png, the bottom tick labels (month names) are > missing. It worked in matplotlib ≤ 1.2.0 I can confirm the issue with 1.2.1 but it works with a recent development version (output attached) so it must have been fixed at some point. Goyo |
|
From: Kari A. <kar...@st...> - 2013-08-26 12:10:08
|
On 08/25/13 19:12, Goyo wrote: > >> Thank you. I'd like to stick to pure OO, but I'm using some >> third party open source code that uses pylab extensively for >> rather large and interactive (as in "includes scrollbars, >> buttons and several types of events") figures. The code >> works nicely in itself, and has an option to return the >> figure object without actually showing the plot. >> >> I was hoping to take the returned figure as an object and >> reset the related state environment information, effectively >> "smuggling" the created figure out of the state environment. >> If there is a simple way to do this in Matplotlib, that >> would be quite useful. > Does pyplot.close(fig) not do what you need? > > Goyo The problem is when to call pyplot.close(fig). The actual visible figure on the canvas is often resized along with window it is in, in addition to being interacted with in other ways. In these cases you can't just close the figure after drawing it - if you do, the resizing results in a blank canvas and a PyDeadObjectError. The easiest workaround to the problem is simply making the whole window modal, and closing the figure if the window is closed for any reason - or before you create a new figure. This is less than ideal, but lets the life go on in this case. Kari |
|
From: Peter Z. <pet...@gm...> - 2013-08-26 09:35:29
|
Hello, I set the x data only once now. It is a little bit faster (about 10%). I'm still looking for a solution which only redraws the line and not the whole widget. Peter Am 25.08.2013 15:00, schrieb Skip Montanaro: >> def updateGraph(self,data): >> datacut = data[10000 - self.DiagrammBreite.get_value():10000] >> self.line.set_ydata(datacut) >> self.line.set_xdata(numpy.arange(0, datacut.size, 1)) >> self.fig.canvas.draw() > If nothing else, it appears that the plot's x data are constant. Have > you tried just setting it once when you create self.line? > > Skip |
|
From: Nicolas M. <nic...@la...> - 2013-08-26 08:16:14
|
Le Ven 19 juillet 2013 17:47, Nicolas Mailhot a écrit : > Le Mer 17 juillet 2013 14:56, Michael Droettboom a écrit : Hi, >> Can you please provide a completely standalone example? The following >> code has undefined variables etc. > > Here it is, I'm afraid this testcase intent is less clear than what I > pasted previously (I replaced variables with precomputed values) > > As shown in the attached png, the bottom tick labels (month names) are > missing. It worked in matplotlib ≤ 1.2.0 Can you confirm the example was good enough for identifying the problem or did I forget something again? Regards, -- Nicolas Mailhot |
|
From: Goyo <goy...@gm...> - 2013-08-25 16:12:10
|
2013/8/23 Kari Aliranta <kar...@st...>: > 23.08.2013 20:57, Eric Firing kirjoitti: > Thank you. I'd like to stick to pure OO, but I'm using some > third party open source code that uses pylab extensively for > rather large and interactive (as in "includes scrollbars, > buttons and several types of events") figures. The code > works nicely in itself, and has an option to return the > figure object without actually showing the plot. > > I was hoping to take the returned figure as an object and > reset the related state environment information, effectively > "smuggling" the created figure out of the state environment. > If there is a simple way to do this in Matplotlib, that > would be quite useful. Does pyplot.close(fig) not do what you need? Goyo |
|
From: Skip M. <sk...@po...> - 2013-08-25 13:00:33
|
> def updateGraph(self,data): > datacut = data[10000 - self.DiagrammBreite.get_value():10000] > self.line.set_ydata(datacut) > self.line.set_xdata(numpy.arange(0, datacut.size, 1)) > self.fig.canvas.draw() If nothing else, it appears that the plot's x data are constant. Have you tried just setting it once when you create self.line? Skip |
|
From: Peter Z. <pet...@gm...> - 2013-08-25 07:50:38
|
Hello,
I want a real-time animation. There is no loop in the animation because
the data comes from the real world (AD data). I wrote this class:
class Eigendiagramm(object):
def __init__(self,daten):
self.DiagrammBreite = gtk.Adjustment(100,20,10000,1,10,10)
self.DiagrammBreiteWidget = gtk.VScale(self.DiagrammBreite)
self.DiagrammBreiteWidget.connect("value_changed",
self.updateBreite, None)
self.data = daten
self.fig = Figure()
self.fig.set_animated(True)
self.graph = self.fig.add_subplot(111)
self.line, = self.graph.plot(self.data.get_ekg_data(),)
self.graph.axis([0, self.DiagrammBreite.get_value(), 0, 4096])
self.canvas = FigureCanvas(self.fig)
self.DiagrammBreite = gtk.Adjustment(100,20,10000,1,10,10)
self.DiagrammBreiteWidget = gtk.VScale(self.DiagrammBreite)
self.DiagrammBreiteWidget.connect("value_changed",
self.updateBreite, None)
def updateGraph(self,data):
datacut = data[10000 - self.DiagrammBreite.get_value():10000]
self.line.set_ydata(datacut)
self.line.set_xdata(numpy.arange(0, datacut.size, 1))
self.fig.canvas.draw()
def updateBreite(self,widget, data = None):
self.graph.axis([0, self.DiagrammBreite.get_value(), 0, 4096])
It works but it is very slow. (About 160mS for updateGraph when I have
two graphs) Is there any possibility to improve the performance? I
embedded the figure in GTK.
I looked to animation examples but every example there is a loop. So I
don't know how to use this class for my problem.
Peter
|
|
From: Francesco M. <fra...@gm...> - 2013-08-24 10:26:08
|
use the "zorder" keyword. higher zorder stay above lower values. cheers Francesco Il giorno 24/ago/2013 11:27, "vwf" <vw...@vu...> ha scritto: > Hello, > > In the attached example I would like to have the wedges under the > arrows. Can someone tell me how do this? I tried to follow the tutorial > from http://matplotlib.org/users/artists.html but I didn't really get > it all. > > Thank you > > > from pylab import * > from numpy import ma > import math > import matplotlib.pyplot as plt > from matplotlib.patches import Wedge > > X,Y = meshgrid( arange(0,2*pi,1),arange(0,2*pi,1) ) > U = cos(X) > V = sin(Y) > > def draw_w(x, y, p1, v, ax=None, **kwargs): > if ax is None: > ax = plt.gca() > p1*=180/math.pi > t1= (p1-v) > t2= (p1+v) > c=(x,y) > radius=0.5 > w1 = Wedge(c, radius, t1, t2, fc='0.0', ec='None', alpha=1.0, **kwargs) > ax.add_artist(w1) > > fig, ax = plt.subplots() > Q = plt.quiver( U, V, color='LightSalmon', edgecolors='LightSalmon') > (a,b)=shape(X) > for i in range(a): > for j in range(b): > draw_w(X[i,j],Y[i,j],X[i,j], 25, ax=ax) > plt.show() > > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: vwf <vw...@vu...> - 2013-08-24 09:26:04
|
Hello, In the attached example I would like to have the wedges under the arrows. Can someone tell me how do this? I tried to follow the tutorial from http://matplotlib.org/users/artists.html but I didn't really get it all. Thank you from pylab import * from numpy import ma import math import matplotlib.pyplot as plt from matplotlib.patches import Wedge X,Y = meshgrid( arange(0,2*pi,1),arange(0,2*pi,1) ) U = cos(X) V = sin(Y) def draw_w(x, y, p1, v, ax=None, **kwargs): if ax is None: ax = plt.gca() p1*=180/math.pi t1= (p1-v) t2= (p1+v) c=(x,y) radius=0.5 w1 = Wedge(c, radius, t1, t2, fc='0.0', ec='None', alpha=1.0, **kwargs) ax.add_artist(w1) fig, ax = plt.subplots() Q = plt.quiver( U, V, color='LightSalmon', edgecolors='LightSalmon') (a,b)=shape(X) for i in range(a): for j in range(b): draw_w(X[i,j],Y[i,j],X[i,j], 25, ax=ax) plt.show() |
|
From: Chris B. <cbe...@cf...> - 2013-08-23 21:29:25
|
Thanks for the tips -- I wish there was a way to do this within MPL, but it sounds like I'll have to live with external hackery. > > > PS. Try to convince the Dark Powers of the journal you send your work, > > that they modernize their processing and accept PDF. > +1 I know, right? chris |