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
(8) |
2
(7) |
3
(8) |
4
(12) |
5
(1) |
6
(1) |
7
(9) |
8
(2) |
9
|
10
(1) |
11
|
12
(6) |
13
(6) |
14
(2) |
15
(7) |
16
(10) |
17
|
18
(3) |
19
(4) |
20
(4) |
21
(10) |
22
(8) |
23
(17) |
24
(13) |
25
(9) |
26
(1) |
27
(1) |
28
(4) |
29
(7) |
30
(2) |
31
(10) |
|
|
From: Chao Y. <cha...@gm...> - 2012-05-23 14:32:46
|
Dear all, I have two different monitors. How can I use plot command within terminal in this monitor and set the figure to show defaultly in another one? thanks, Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
From: Meesters, Aesku.K. I. <mee...@ae...> - 2012-05-23 14:15:08
|
Thanks, Ben. This is indeed what I was looking for and gives the desired behavior. Thanks a lot! Chris On Wed, 2012-05-23 at 08:55 -0400, Benjamin Root wrote: > > On Wed, May 23, 2012 at 4:03 AM, Meesters, Aesku.Kipp Institute > <mee...@ae...> wrote: > Hi, > > I'm following the example in the gallery to do a barchart plot > (see > http://matplotlib.sourceforge.net/examples/api/barchart_demo.html ). > > In contrast to the example I would like to see the error bars > only above > the bars, so I tried > > rects2 = ax.bar(ind+width, womenMeans, width, color='y', > yerr=stds, error_kw = {'barsabove': True, > 'ecolor' : 'k'} > > While the 'ecolor' argument gets accepted, 'barsabove' > apparently has no > effect (error bars still point up and downwards) - yet, no > warning / > error is triggered. Where is my mistake? Or is this a bug > (still using > version 1.0.1) with a known work-around? > > TIA > Chris > > > Chris, > > I don't think "barsabove" does what you want. By "above", it means > that the errorbar is plotted in a layer on top of the plotting symbol > rather than in the layer under it. Both ends will be plotted. > > To get what you want, you might want to try (Note: untested): > > rects2 = ax.bar(ind+width, womenMeans, width, color='y', > yerr=np.vstack([[0]*len(stds), stds]), error_kw = > {'ecolor' : 'k'}) > > When yerr is a 2xN numpy array, errorbars are plotted at y-yerr[0, :] > and y+yerr[1,:]. So, np.vstack creates a 2xN array where the first row > is all zeros and the second row is the stds values. > > I hope that works for you! > Ben Root > > |
From: Sergi P. F. <spo...@gm...> - 2012-05-23 13:04:32
|
On Wed, May 23, 2012 at 11:00 AM, Guillaume Gay <gui...@mi...> wrote: > Hello > > > What is the size of a single image file? If they are very big, it is > better to do everything from processing to ploting at once for each file. As stated below, each image is single-channel, of 4600x3840 pixels. As you can see on the code, there is not much processing, just loading the images and plotting them. What it's slow is not the execution of the code, is the interactive zooming and panning once the plots "are in the screen". >> It's 15 images, single-channel, of 4600x3840 pixels each. > This is a lot of data. 8bit or 16bit ? They are floating point values (for example, from 0 to 45.xxx). If I understood correctly, setting the vmin and vmax, matplotlib should normalize the values to an appropriate number of bits. >> for f in filelist: > everything should happen in this loop > >> dataset = ncdf.Dataset(os.path.join(sys.argv[1],f), 'r') >> data.append(dataset.variables[variable][:]) > instead of creating this big list, use a temporary array (which will be > overwritten) >> dataset.close() >> dates.append((f.split('_')[2][:-3],f.split('_')[1])) Why? It's true that this way at the beginning it eats a lot of RAM, but then it is released after each pop() (and calculating the maximum of all the data without plotting is needed to use the same normalization level on all the plots). Anyway, the slowness ocurrs during the interaction of the plot, not during the execution of the code. |
From: Benjamin R. <ben...@ou...> - 2012-05-23 12:56:14
|
On Wed, May 23, 2012 at 4:03 AM, Meesters, Aesku.Kipp Institute < mee...@ae...> wrote: > Hi, > > I'm following the example in the gallery to do a barchart plot (see > http://matplotlib.sourceforge.net/examples/api/barchart_demo.html ). > > In contrast to the example I would like to see the error bars only above > the bars, so I tried > > rects2 = ax.bar(ind+width, womenMeans, width, color='y', > yerr=stds, error_kw = {'barsabove': True, > 'ecolor' : 'k'} > > While the 'ecolor' argument gets accepted, 'barsabove' apparently has no > effect (error bars still point up and downwards) - yet, no warning / > error is triggered. Where is my mistake? Or is this a bug (still using > version 1.0.1) with a known work-around? > > TIA > Chris > > Chris, I don't think "barsabove" does what you want. By "above", it means that the errorbar is plotted in a layer on top of the plotting symbol rather than in the layer under it. Both ends will be plotted. To get what you want, you might want to try (Note: untested): rects2 = ax.bar(ind+width, womenMeans, width, color='y', yerr=np.vstack([[0]*len(stds), stds]), error_kw = {'ecolor' : 'k'}) When yerr is a 2xN numpy array, errorbars are plotted at y-yerr[0, :] and y+yerr[1,:]. So, np.vstack creates a 2xN array where the first row is all zeros and the second row is the stds values. I hope that works for you! Ben Root |
From: Michael D. <md...@st...> - 2012-05-23 12:30:01
|
It's a long shot, but have you tried removing the font cache in ~/.matplotlib/fontList.cache? What version of matplotlib are you using? Mike On 05/23/2012 08:16 AM, Waléria Antunes David wrote: > Hi, > > Anyone know how to solve this error? > > Exception Type: TypeError Exception Value: coercing to Unicode: need > string or buffer, dict found > > Can you help me?? > > See mycode: http://dpaste.com/751460/ > > And see my Traceback: http://dpaste.com/750773/ > > > Thanks, > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Waléria A. D. <wal...@gm...> - 2012-05-23 12:16:20
|
Hi, Anyone know how to solve this error? Exception Type: TypeError Exception Value: coercing to Unicode: need string or buffer, dict found Can you help me?? See mycode: http://dpaste.com/751460/ And see my Traceback: http://dpaste.com/750773/ Thanks, |
From: rajtendulkar <pra...@gm...> - 2012-05-23 09:49:16
|
Just in case, if anyone needs the answer, I figured it out. I used the transData transform in order to draw the lines correctly. Here is the code - # The code below is to add the lines near the tick labels fig = barGraph.fig xAxisLim=barGraph.ax.xaxis.get_view_interval() tickLocArray = barGraph.ax.xaxis.get_majorticklocs() yStart=-70 yEnd=-0.5 line = Line2D([xAxisLim[0], xAxisLim[0]], [yStart,yEnd],linewidth=2, color='black', transform=barGraph.ax.transData) fig.lines.append(line) for i in xrange(11): lnWidth=2 yStartOffset=0 if((i+1)%4 != 0): lnWidth=1 yStartOffset=20 xOffset = tickLocArray[i] + (tickLocArray[i+1] - tickLocArray[i])/2 line = Line2D([xOffset, xOffset], [yStart+yStartOffset,yEnd],linewidth=lnWidth, color='black', transform=barGraph.ax.transData) fig.lines.append(line) line = Line2D([xAxisLim[1], xAxisLim[1]], [yStart,yEnd],linewidth=2, color='black', transform=barGraph.ax.transData) fig.lines.append(line) plt.figtext(0.247, 0.05, '1') plt.figtext(0.523, 0.05, '2') plt.figtext(0.797, 0.05, '4') Thank You! Raj rajtendulkar wrote: > > Dear All, > > I am trying to write a program in matplotlib to generate stacked bar > graphs. > My problem is that the commands - plt.show() and > self.fig.savefig(fileName) generate different outputs. > I tried different output formats like PDF, PNG, EPS. But the problem > remains the same. > This happens for the lines that I am trying to draw outside the plot. > I am trying to draw vertical lines between xticklabels. > I have uploaded the data file and the code file. > http://old.nabble.com/file/p33893817/data.dat data.dat > http://old.nabble.com/file/p33893817/matplot1.py matplot1.py > Could anyone explain how to resolve this problem? > > Thank You, > Raj > -- View this message in context: http://old.nabble.com/Difference-in-show-and-output-file-tp33893817p33894599.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Guillaume G. <gui...@mi...> - 2012-05-23 09:22:32
|
Hello What is the size of a single image file? If they are very big, it is better to do everything from processing to ploting at once for each file. Le 23/05/2012 10:11, Sergi Pons Freixes a écrit : > I'm plotting several images at once, sharing axes, because I use it > for exploratory purposes. Each image is the same satellite image at > different dates. I'm experimenting a slow response from matplotlib > when zooming and panning, and I would like to ask for any tips that > could speed up the process. > > What I am doing now is: > - Load data from several netcdf files. > - Calculate maximum value of all the data, for normalization. > - Create a grid of subplots using ImageGrid. As each subplot is > generated, I delete the array to free some memory (each array is > stored in a list, the "deletion" is just a list.pop()). See the code > below. > > It's 15 images, single-channel, of 4600x3840 pixels each. This is a lot of data. 8bit or 16bit ? > I've noticed > that the bottleneck is not the RAM (I have 8 GB), but the processor. > Python spikes to 100% usage on one of the cores when zooming or > panning (it's an Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz, 4 cores, 64 > bit). > > The code is: > ------------------------------------------- > import os > import sys > > import numpy as np > import netCDF4 as ncdf > import matplotlib.pyplot as plt > from mpl_toolkits.axes_grid1 import ImageGrid > from matplotlib.colors import LogNorm > > MIN = 0.001 # Hardcoded minimum data value used in normalization > > variable = 'conc_chl' > units = r'$mg/m^3$' > data = [] > dates = [] > > # Get a list of only netCDF files > filelist = os.listdir(sys.argv[1]) > filelist = [f for f in filelist if os.path.splitext(f)[1] == '.nc'] > filelist.sort() > filelist.reverse() > > # Load data and extract dates from filenames > for f in filelist: everything should happen in this loop > dataset = ncdf.Dataset(os.path.join(sys.argv[1],f), 'r') > data.append(dataset.variables[variable][:]) instead of creating this big list, use a temporary array (which will be overwritten) > dataset.close() > dates.append((f.split('_')[2][:-3],f.split('_')[1])) > > # Get the maximum value of all data. Will be used for normalization > maxc = np.array(data).max() > > # Plot the grid of images + dates > fig = plt.figure() > grid = ImageGrid(fig, 111,\ > nrows_ncols = (3, 5),\ > axes_pad = 0.0,\ > share_all=True,\ > aspect = False,\ > cbar_location = "right",\ > cbar_mode = "single",\ > cbar_size = '2.5%',\ > ) > for g in grid: > v = data.pop() > d = dates.pop() > im = g.imshow(v, interpolation='none', norm=LogNorm(), vmin=MIN, vmax=maxc) > g.text(0.01, 0.01, '-'.join(d), transform = g.transAxes) # Date on a corner > cticks = np.logspace(np.log10(MIN), np.log10(maxc), 5) > cbar = grid.cbar_axes[0].colorbar(im) > cbar.ax.set_yticks(cticks) > cbar.ax.set_yticklabels([str(np.round(t, 2)) for t in cticks]) > cbar.set_label_text(units) > > # Fine-tune figure; make subplots close to each other and hide x ticks for > # all > fig.subplots_adjust(left=0.02, bottom=0.02, right=0.95, top=0.98, > hspace=0, wspace=0) > grid.axes_llc.set_yticklabels([], visible=False) > grid.axes_llc.set_xticklabels([], visible=False) > > plt.show() > ------------------------------------------- > > Any clue about what could be improved to make it more responsive? > > PD: This question has been posted previously on Stackoverflow, but it > hasn't got any answer: > http://stackoverflow.com/questions/10635901/slow-imshow-when-zooming-or-panning-with-several-synced-subplots > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Mads I. <mad...@gm...> - 2012-05-23 08:58:57
|
Hi, I have attached a small example displaying a simple plot in a PyQt based widget. If you start resizing the widget manually, the labels of the axes as well as the title disappear from the plot window even for moderately small window sizes. Any suggestions on how I can fix this? Best regards, Mads -- +-----------------------------------------------------+ | Mads Ipsen | +----------------------+------------------------------+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby | phone: +45-29716388 | | Denmark | email: mad...@gm... | +----------------------+------------------------------+ |
From: Meesters, Aesku.K. I. <mee...@ae...> - 2012-05-23 08:23:35
|
Hi, I'm following the example in the gallery to do a barchart plot (see http://matplotlib.sourceforge.net/examples/api/barchart_demo.html ). In contrast to the example I would like to see the error bars only above the bars, so I tried rects2 = ax.bar(ind+width, womenMeans, width, color='y', yerr=stds, error_kw = {'barsabove': True, 'ecolor' : 'k'} While the 'ecolor' argument gets accepted, 'barsabove' apparently has no effect (error bars still point up and downwards) - yet, no warning / error is triggered. Where is my mistake? Or is this a bug (still using version 1.0.1) with a known work-around? TIA Chris |
From: Sergi P. F. <spo...@gm...> - 2012-05-23 08:12:06
|
I'm plotting several images at once, sharing axes, because I use it for exploratory purposes. Each image is the same satellite image at different dates. I'm experimenting a slow response from matplotlib when zooming and panning, and I would like to ask for any tips that could speed up the process. What I am doing now is: - Load data from several netcdf files. - Calculate maximum value of all the data, for normalization. - Create a grid of subplots using ImageGrid. As each subplot is generated, I delete the array to free some memory (each array is stored in a list, the "deletion" is just a list.pop()). See the code below. It's 15 images, single-channel, of 4600x3840 pixels each. I've noticed that the bottleneck is not the RAM (I have 8 GB), but the processor. Python spikes to 100% usage on one of the cores when zooming or panning (it's an Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz, 4 cores, 64 bit). The code is: ------------------------------------------- import os import sys import numpy as np import netCDF4 as ncdf import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import ImageGrid from matplotlib.colors import LogNorm MIN = 0.001 # Hardcoded minimum data value used in normalization variable = 'conc_chl' units = r'$mg/m^3$' data = [] dates = [] # Get a list of only netCDF files filelist = os.listdir(sys.argv[1]) filelist = [f for f in filelist if os.path.splitext(f)[1] == '.nc'] filelist.sort() filelist.reverse() # Load data and extract dates from filenames for f in filelist: dataset = ncdf.Dataset(os.path.join(sys.argv[1],f), 'r') data.append(dataset.variables[variable][:]) dataset.close() dates.append((f.split('_')[2][:-3],f.split('_')[1])) # Get the maximum value of all data. Will be used for normalization maxc = np.array(data).max() # Plot the grid of images + dates fig = plt.figure() grid = ImageGrid(fig, 111,\ nrows_ncols = (3, 5),\ axes_pad = 0.0,\ share_all=True,\ aspect = False,\ cbar_location = "right",\ cbar_mode = "single",\ cbar_size = '2.5%',\ ) for g in grid: v = data.pop() d = dates.pop() im = g.imshow(v, interpolation='none', norm=LogNorm(), vmin=MIN, vmax=maxc) g.text(0.01, 0.01, '-'.join(d), transform = g.transAxes) # Date on a corner cticks = np.logspace(np.log10(MIN), np.log10(maxc), 5) cbar = grid.cbar_axes[0].colorbar(im) cbar.ax.set_yticks(cticks) cbar.ax.set_yticklabels([str(np.round(t, 2)) for t in cticks]) cbar.set_label_text(units) # Fine-tune figure; make subplots close to each other and hide x ticks for # all fig.subplots_adjust(left=0.02, bottom=0.02, right=0.95, top=0.98, hspace=0, wspace=0) grid.axes_llc.set_yticklabels([], visible=False) grid.axes_llc.set_xticklabels([], visible=False) plt.show() ------------------------------------------- Any clue about what could be improved to make it more responsive? PD: This question has been posted previously on Stackoverflow, but it hasn't got any answer: http://stackoverflow.com/questions/10635901/slow-imshow-when-zooming-or-panning-with-several-synced-subplots |
From: rajtendulkar <pra...@gm...> - 2012-05-23 06:57:13
|
Dear All, I am trying to write a program in matplotlib to generate stacked bar graphs. My problem is that the commands - plt.show() and self.fig.savefig(fileName) generate different outputs. I tried different output formats like PDF, PNG, EPS. But the problem remains the same. This happens for the lines that I am trying to draw outside the plot. I am trying to draw vertical lines between xticklabels. I have uploaded the data file and the code file. http://old.nabble.com/file/p33893817/data.dat data.dat http://old.nabble.com/file/p33893817/matplot1.py matplot1.py Could anyone explain how to resolve this problem? Thank You, Raj -- View this message in context: http://old.nabble.com/Difference-in-show-and-output-file-tp33893817p33893817.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: wiswit <cha...@gm...> - 2012-05-22 20:46:51
|
Thanks Jerzy. It works fine. I may return to this topic for more discussion later. chao Jerzy Karczmarczuk-2 wrote: > > Benjamin Root : >> Colorbars are a bit tricky. They are actually a subplot axes separate >> from your plotting axes. And I don't think they are very easy to >> remove. You could do a "cbar.axes.cla()", but that would still leave >> the "ticks", tick labels and the colorbar label. >> >> I am sure that there is a way to get to what you want, but it isn't >> immediately obvious. > Well, I tried with some success the following. Suppose the programme is: > > from pylab import * > fig = figure() > ax = fig.add_subplot(111) > data = rand(250, 250) > cax = ax.imshow(data) > cbar = fig.colorbar(cax) > show() > > Now, fig has two axes, the main, and the bar. The command > > fig.delaxes(fig.axes[1]) > > gets rid of the bar and the ticks. > Is there anything wrong with that? Of course, I knew that fig.axes[1] > was the bar, but finding it in a more complicated case should not be > difficult. > > All the best. > > Jerzy Karczmarczuk > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/how-to-remove-colorbar--tp33882320p33892056.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Giovanni <gio...@in...> - 2012-05-22 20:09:46
|
lunedì 21 maggio 2012, 21:30, Kevin Davies: > Hi Giovanni, > > Thanks for your report. It looks like in this case the "dip" in the > large, single input caused the input label to be at the center of the > diagram. You might want to try increasing the trunklength > parameter. Maybe someone has ideas to make this sort of thing more > automatic, but otherwise it takes some manual tweaking. Hi Kevin and thanks for replying. I've tried increasing the trunklength parameter, but i can't get the patch label in the center. Giovanni |
From: Chao Y. <cha...@gm...> - 2012-05-22 16:48:53
|
Dear all, ferret now has a pyferret module available through python. Just in case some people have used ferret before and might be interesting :) cheers, Chao ---------- Forwarded message ---------- From: Karl Smith <kar...@no...> Date: 2012/5/22 Subject: [ferret_users] PyFerret (beta) documentation and release available from Ferret website To: ferret <fer...@no...> For those interested in trying out PyFerret (Ferret as a Python module), or those just interested in knowing more about PyFerret, there are now documentation and download pages available on the Ferret website under the documentation tab: http://ferret.pmel.noaa.gov/Ferret/documentation/pyferret Toward the bottom part of the page is the link for the Downloads page, which gives links for pre-built binaries and for source (as gzipped tar files). Below it is a link for the Installing or Building PyFerret page, which gives step-by-step instructions for installing or building the program. There is also a link for the Known Issues page, listing changes in behavior and the most serious bugs that I am aware of. This is the latest version (0.0.8) of PyFerret which produces better graphics and supports saving images directly as PNG and PDF files. (The XGKS graphics library has been replaced with Cairo and PyQt. It still uses Plot+, so those PPL commands still work). It contains the latest released version of Ferret, and is (statically) linked with NetCDF-4.2 libraries. I still am considering it a beta version because of the bugs listed in the Known Issues page. -- Karl -- Karl M. Smith, Ph.D. JISAO Univ. Wash. and TMAP/PMEL NOAA "The contents of this message are mine personally and do not necessarily reflect any position of the Government or the National Oceanic and Atmospheric Administration." -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
From: Stevenson, S. <Sam...@co...> - 2012-05-22 13:20:28
|
Hi Ben I am using 1.0.0. My colleague has 1.1.0 installed on his machine and is able to reproduce the same problem. Thanks Sam From: ben...@gm... [mailto:ben...@gm...] On Behalf Of Benjamin Root Sent: 22 May 2012 14:14 To: Stevenson, Samuel Cc: mat...@li... Subject: Re: [Matplotlib-users] plt.close() not releasing memory? Or memory leak elsewhere? On Tue, May 22, 2012 at 8:44 AM, Stevenson, Samuel <Sam...@co...<mailto:Sam...@co...>> wrote: Hi All After spending all day working on this I have discovered that if I explicity change the matplotlib backend in spyder from 'Qt4Agg' to 'Agg' then my code executes as expected with no memory errors. Any ideas about this? It seems like a bug in Qt4Agg of some kind---is there somewhere I should file a bug report? Thanks Sam Which version of mpl are you using? There have already been some efforts to close out memory leaks and yours may already be fixed in the development version of mpl. Ben Root |
From: Benjamin R. <ben...@ou...> - 2012-05-22 13:14:36
|
On Tue, May 22, 2012 at 8:44 AM, Stevenson, Samuel < Sam...@co...> wrote: > Hi All**** > > ** ** > > After spending all day working on this I have discovered that if I > explicity change the matplotlib backend in spyder from ‘Qt4Agg’ to ‘Agg’ > then my code executes as expected with no memory errors. **** > > ** ** > > Any ideas about this? It seems like a bug in Qt4Agg of some kind---is > there somewhere I should file a bug report? **** > > ** ** > > Thanks**** > > > Sam **** > > ** ** > > ** > Which version of mpl are you using? There have already been some efforts to close out memory leaks and yours may already be fixed in the development version of mpl. Ben Root |
From: Stevenson, S. <Sam...@co...> - 2012-05-22 12:45:30
|
Hi All After spending all day working on this I have discovered that if I explicity change the matplotlib backend in spyder from 'Qt4Agg' to 'Agg' then my code executes as expected with no memory errors. Any ideas about this? It seems like a bug in Qt4Agg of some kind---is there somewhere I should file a bug report? Thanks Sam |
From: Stevenson, S. <Sam...@co...> - 2012-05-22 08:21:44
|
Hi All. I'm experiencing some memory issues with some python/matplotlib code. I have a large object/class containing a lot of data, and whilst using that object to create (about 30) graphs I keep running into memory errors. Here is a description of my problem: Firstly, I am able to create each graph individually. So if I run each graph creation function individually in the interpreter I get the desired result: MyClass.TypicalPlot(save=True, show = False) However, if I create a new function to run each graph function in a script then I get a "MemoryError: Could not allocate memory for path". (varies at the precise point where, but its normally after 3 or 4 graphs). I am able to run each plot function in an interpreter without issue, so I can only assume its some kind of memory/garbage collection issue. def saveAllPlots(self, comments = False): if self.comment is None: comment = False else: comment = True self.TypicalPlot(save=True, show=False, comment=comment) self.AnotherPlot(save=True, show=False) self.AnotherPlot2(save=True, show=False) self.AnotherPlot3(save=True, show=False) ...etc, etc, etc Here is what a typical plot function looks like in my code (they are all very similar) def TypicalPlot(self, title=None, comment=False, save=False, show=True): if title is None: title = self.dat.title fig = plt.figure() host = SubplotHost(fig, 111) fig.add_subplot(host) par = host.twinx() host.set_xlabel("Time (hrs)") host.set_ylabel("Power (W)") par.set_ylabel("Temperature (C)") p1, = host.plot(self.dat.timebase1, self.dat.pwr, 'b,', label="Power", markevery= self.skip) p2, = par.plot(self.dat.timebase2, self.dat.Temp1, 'r,', label="Temp 1", markevery= self.skip) p3, = par.plot(self.dat.timebase2, self.dat.Temp2, 'g,', label="Temp 2", markevery= self.skip) p4, = par.plot(self.dat.timebase2, self.dat.Temp3, 'm,', label="Temp 3", markevery= self.skip) host.axis["left"].label.set_color(p1.get_color()) # par.axis["right"].label.set_color(p2.get_color()) #host.legend(loc='lower left') plt.title(title+" Temperature") leg=host.legend(loc='lower left',fancybox=True) #leg.get_frame().set_alpha(0.5) frame = leg.get_frame() frame.set_facecolor('0.80') ### make the legend text smaller for t in leg.get_texts(): t.set_fontsize('small') ### set the legend text color to the same color as the plots for added ### readability leg.get_texts()[0].set_color(p1.get_color()) leg.get_texts()[1].set_color(p2.get_color()) leg.get_texts()[2].set_color(p3.get_color()) leg.get_texts()[3].set_color(p4.get_color()) if show is True and save is True: plt.show() plt.savefig('temp.png') elif show is True and save is False: plt.show() elif show is False and save is True: plt.savefig('temp.png') plt.clf() plt.close(fig) Has anyone come across this before? Regards, Sam Stevenson |
From: Kevin D. <kda...@gm...> - 2012-05-22 01:30:22
|
<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body text="#000000" bgcolor="#FFFFFF"> <pre wrap="">Hi Giovanni, Thanks for your report. It looks like in this case the "dip" in the large, single input caused the input label to be at the center of the diagram. You might want to try increasing the trunklength parameter. Maybe someone has ideas to make this sort of thing more automatic, but otherwise it takes some manual tweaking. I hope this helps. Kevin </pre> <br> On 05/21/2012 11:39 AM, Giovanni wrote: <blockquote cite="mid:201...@in..." type="cite"> <pre wrap=""> Hi all! I'm experiencing a strange behaviour with sankey diagram. As you can see from the attached image, the patch label it's not positioned in the middle of the patch (as it should), but it's plotted over the first label... The code is attached also. Any hints? Thanks, Giovanni</pre> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a></pre> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Matplotlib-users mailing list <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Mat...@li...">Mat...@li...</a> <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a> </pre> </blockquote> <br> <br> </body> </html> |
From: Jerzy K. <jer...@un...> - 2012-05-21 22:32:38
|
Benjamin Root : > Colorbars are a bit tricky. They are actually a subplot axes separate > from your plotting axes. And I don't think they are very easy to > remove. You could do a "cbar.axes.cla()", but that would still leave > the "ticks", tick labels and the colorbar label. > > I am sure that there is a way to get to what you want, but it isn't > immediately obvious. Well, I tried with some success the following. Suppose the programme is: from pylab import * fig = figure() ax = fig.add_subplot(111) data = rand(250, 250) cax = ax.imshow(data) cbar = fig.colorbar(cax) show() Now, fig has two axes, the main, and the bar. The command fig.delaxes(fig.axes[1]) gets rid of the bar and the ticks. Is there anything wrong with that? Of course, I knew that fig.axes[1] was the bar, but finding it in a more complicated case should not be difficult. All the best. Jerzy Karczmarczuk |
From: Andreas M. <amu...@ai...> - 2012-05-21 20:01:52
|
Hi everybody. I have been trying to turn off xticks and yticks and their labels in matplotlibrc. Ticks <http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Tick> have an argument "tick1On" and "label1On" but it seems I can not use these in the config file. Is that correct? Is there any other way to turn of ticks by default? Thanks, Andy |
From: Benjamin R. <ben...@ou...> - 2012-05-21 19:24:27
|
On Mon, May 21, 2012 at 8:17 AM, Chao YUE <cha...@gm...> wrote: > Dear all, > > Is there a way to remove colorbar? axes.cla() clears only the region for > map but not the colorbar. > > Chao > > Colorbars are a bit tricky. They are actually a subplot axes separate from your plotting axes. And I don't think they are very easy to remove. You could do a "cbar.axes.cla()", but that would still leave the "ticks", tick labels and the colorbar label. I am sure that there is a way to get to what you want, but it isn't immediately obvious. If someone knows how to do it, maybe we should make that into a convenience function? Perhaps cbar.remove()? Sorry I could not be more help. Ben Root |
From: Eric F. <ef...@ha...> - 2012-05-21 18:01:13
|
On 05/21/2012 06:33 AM, Brian wrote: > Greetings all, > > I am trying to place line labels on a plot similar to how contours in a > contour plot are labeled (i.e. clabel). I have found that I can use > ax.annotate but have to optimize by hand while the clabel for contours > finds a "good" location without my having to find it. Is this feature > available? No, it is not. It has occurred to me that factoring out a "labeled_line" functionality might be useful, but I haven't looked into it. Eric > > Regards, > Brian |
From: Brian <fo...@gm...> - 2012-05-21 16:33:50
|
Greetings all, I am trying to place line labels on a plot similar to how contours in a contour plot are labeled (i.e. clabel). I have found that I can use ax.annotate but have to optimize by hand while the clabel for contours finds a "good" location without my having to find it. Is this feature available? Regards, Brian |