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
(9) |
2
(8) |
3
(6) |
4
(5) |
5
(10) |
6
(1) |
7
|
8
(5) |
9
(3) |
10
(12) |
11
(24) |
12
(28) |
13
(16) |
14
(3) |
15
(10) |
16
(17) |
17
(19) |
18
(10) |
19
(20) |
20
(7) |
21
(11) |
22
(7) |
23
(5) |
24
(4) |
25
(11) |
26
(19) |
27
(1) |
28
(1) |
29
(13) |
30
(7) |
31
(22) |
|
|
|
From: Eric F. <ef...@ha...> - 2011-08-24 17:36:04
|
On 08/24/2011 06:53 AM, Jeffrey Spencer wrote: > I created this graph below but if I set the y axis upper limit to 100. > It cuts off the top half of the dots which are at 100. I wasn't sure how > to get the dots to show properly like now but set the y-axis upper limit > to 100 instead of like 102. It makes the data look misleading to have > that little tail above 100. Essentially a way to create the axis but > offset the actual axis grid to 95% of that or any other suggestions. > > Cheers Try the changes indicated below. > > > Script used to create here: > > import matplotlib.pyplot as plt > import matplotlib.ticker as tick > from numpy import load, sqrt, shape, size, loadtxt, transpose > > def clear_spines(ax): > ax.spines['top'].set_color('none') > ax.spines['right'].set_color('none') > def set_spineLineWidth(ax, lineWidth): > for i in ax.spines.keys(): > ax.spines[i].set_linewidth(lineWidth) > def showOnlySomeTicks(x, pos): > s = str(int(x)) > if x == 5000: > return '5e3'#'%.0e' % x > return '' > > > plt.close('all') > golden_mean = (sqrt(5)-1.0)/2.0 # Aesthetic ratio > fig_width = fig_width_pt*inches_per_pt # width in inches > fig_height = fig_width*golden_mean # height in inches > fig_size = [fig_width,fig_height] > tick_size = 9 > fontlabel_size = 10.5 > params = {'backend': 'wxAgg', 'axes.labelsize': fontlabel_size, > 'text.fontsize': fontlabel_size, 'legend.fontsize': fontlabel_size, > 'xtick.labelsize': tick_size, 'ytick.labelsize': tick_size, > 'text.usetex': True, 'figure.figsize': fig_size} > plt.rcParams.update(params) > sizeX = storeMat[0].size > fig = plt.figure(1) > #figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k') > #fig.set_size_inches(fig_size) > plt.clf() > ax = plt.axes([0.145,0.18,0.95-0.155,0.95-0.2]) pts, = plt.plot(storeMat[0][::2],storeMat[1][::2]/300.*100,'ko',markersize=3.5) # Note: the comma after "pts" is intentional. pts.set_clip_on(False) > #plt.plot(storeMat[0][::2],storeMat[1][::2]/300.*100,'k') plt.ylim(0,100) > plt.xlabel('Number of Channels') > plt.ylabel('Recognition Accuracy') > set_spineLineWidth(ax,spineLineWidth) > clear_spines(ax) > ax.yaxis.set_ticks_position('left') > ax.xaxis.set_ticks_position('bottom') > #ax.xaxis.set_minor_formatter(tick.FuncFormatter(showOnlySomeTicks)) > #plt.legend() > for i in outExt: > plt.savefig('lineVersion/'+outFile+i, dpi = mydpi) > > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Jeffrey S. <jef...@gm...> - 2011-08-24 16:54:27
|
I created this graph below but if I set the y axis upper limit to 100. It cuts off the top half of the dots which are at 100. I wasn't sure how to get the dots to show properly like now but set the y-axis upper limit to 100 instead of like 102. It makes the data look misleading to have that little tail above 100. Essentially a way to create the axis but offset the actual axis grid to 95% of that or any other suggestions. Cheers Script used to create here: import matplotlib.pyplot as plt import matplotlib.ticker as tick from numpy import load, sqrt, shape, size, loadtxt, transpose def clear_spines(ax): ax.spines['top'].set_color('none') ax.spines['right'].set_color('none') def set_spineLineWidth(ax, lineWidth): for i in ax.spines.keys(): ax.spines[i].set_linewidth(lineWidth) def showOnlySomeTicks(x, pos): s = str(int(x)) if x == 5000: return '5e3'#'%.0e' % x return '' plt.close('all') golden_mean = (sqrt(5)-1.0)/2.0 # Aesthetic ratio fig_width = fig_width_pt*inches_per_pt # width in inches fig_height = fig_width*golden_mean # height in inches fig_size = [fig_width,fig_height] tick_size = 9 fontlabel_size = 10.5 params = {'backend': 'wxAgg', 'axes.labelsize': fontlabel_size, 'text.fontsize': fontlabel_size, 'legend.fontsize': fontlabel_size, 'xtick.labelsize': tick_size, 'ytick.labelsize': tick_size, 'text.usetex': True, 'figure.figsize': fig_size} plt.rcParams.update(params) sizeX = storeMat[0].size fig = plt.figure(1) #figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k') #fig.set_size_inches(fig_size) plt.clf() ax = plt.axes([0.145,0.18,0.95-0.155,0.95-0.2]) plt.plot(storeMat[0][::2],storeMat[1][::2]/300.*100,'ko',markersize=3.5) #plt.plot(storeMat[0][::2],storeMat[1][::2]/300.*100,'k') plt.ylim(0,102) plt.xlabel('Number of Channels') plt.ylabel('Recognition Accuracy') set_spineLineWidth(ax,spineLineWidth) clear_spines(ax) ax.yaxis.set_ticks_position('left') ax.xaxis.set_ticks_position('bottom') #ax.xaxis.set_minor_formatter(tick.FuncFormatter(showOnlySomeTicks)) #plt.legend() for i in outExt: plt.savefig('lineVersion/'+outFile+i, dpi = mydpi) -- ________________________ Jeffrey Spencer jef...@gm... |
From: Neal B. <ndb...@gm...> - 2011-08-23 14:53:28
|
Running from command line (not ipython), is there some way to add a plot and update display without blocking? I have an algorithm that should iteratively converge. I'd like to draw the result (a plot) after N iterations, continue computing, then draw after 2N, etc. Retaining the previous plots. Also, what if I wanted to erase previous plots? |
From: Jae-Joon L. <lee...@gm...> - 2011-08-23 04:14:11
|
You may use a proxy artist. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist for example, from matplotlib.lines import Line2D l1 = Line2D([], [], linewidth=3, color="r") l2 = Line2D([], [], linewidth=3, color="g") l3 = Line2D([], [], linewidth=3, color="b") legend([l1, l2, l3], ["label 1", "label 2", "label 3"]) Regards, -JJ On Wed, Aug 17, 2011 at 1:24 AM, Ravi Kanth Vanapalli <vvn...@gm...> wrote: > Hi , > > I wish to add a custom legend to a multicolored line drawn using matplotlib > as shown in the figure below > http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine > I tried exploring the legend but somehow couldn't figure out its usage and > how to adapt it to multicolored line as in the above link > I need to use say Red line for label1 and blue line for label2 and green > line for label3. All the three colors are a part of a single sinusoidal wave > as in the above link. > Any thoughts/ideas/suggestions which could provide me some direction on this > would be highly appreciated. > > -- > Thanks and Regards, > RaviKanth > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Jae-Joon L. <lee...@gm...> - 2011-08-23 04:08:59
|
On Thu, Aug 18, 2011 at 5:53 PM, mogliii <mo...@gm...> wrote: > 2) I want to make a shared y-axis label. I found this page: > http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label > But any additional axis I put before the gridspec axis is not shown in > the end. Is there a special procedure that can be used together with > gridspec? This is general behavior of subplot command. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplot If you want to suppress this, do something like fig.add_subplot(gs[0]) Regards, -JJ |
From: Jae-Joon L. <lee...@gm...> - 2011-08-23 03:56:22
|
Can you post an simple self-contained script that reproduces your problem? I just tried something similar but could not reproduces your problem. Here is what I did, Also, what version of matplotlb are you using? Regards, -JJ import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.axes_grid1 import ImageGrid fig = plt.figure(1) arr = np.arange(100).reshape((10, 10)) grid = ImageGrid(fig, 111, (2, 2)) cntr0 = grid[0].contour(arr) cntr1 = grid[1].contour(arr) cntr2 = grid[2].contour(arr) cntr3 = grid[3].contour(arr) plt.clabel(cntr0, manual=True) plt.clabel(cntr1, manual=True) plt.clabel(cntr2, manual=True) plt.clabel(cntr3, manual=True) On Thu, Aug 18, 2011 at 1:10 PM, R. O'Gara <ron...@ya...> wrote: > Hey guys, > > > I was hoping someone could provide a hint for how I should go about correcting this. As you can see, locations for the inline labels for > contours in this image are unfortunately chosen, and they overlap with one another. If I set manual to 'True' then I get this weird behavior > where I can only choose labels in the top left grid and nothing is shownin any of the other grids. > > I am using a 2x2 Image Grid (I get the same problem when using gridspec instead of image grid), and loadingcontour data (2x2 array) from a file. > > Thanks for your help, > Ron > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Jae-Joon L. <lee...@gm...> - 2011-08-23 03:44:46
|
If you don't care about the aspect ratio at all, you can use aspect="auto". Check the thread below. http://old.nabble.com/Re%3A-Can-I-change-pixel-aspect-with-axes_grid-p32300471.html Regards, -JJ On Sat, Aug 13, 2011 at 5:01 AM, R. O'Gara <ron...@ya...> wrote: > Hi, > From the attached figure, you can see that the plots I am trying to show in > the bottom two "quadrants", are too narrow. That is because the y-axis of > those two plots is meant to be in the 0-1 range, i.e. much smaller than > y-axis in the upper two, so the height of the bottom grid boxes is tiny. How > can I force the heights of all boxes to be the same? > Much appreciated, > Ron > > ------------------------------------------------------------------------------ > FREE DOWNLOAD - uberSVN with Social Coding for Subversion. > Subversion made easy with a complete admin console. Easy > to use, easy to manage, easy to install, easy to extend. > Get a Free download of the new open ALM Subversion platform now. > http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Michael D. <md...@st...> - 2011-08-22 22:11:24
|
You want to call "set_yscale('symlog')" on the axes. Mike On 08/19/2011 01:07 PM, Jonny Milliken wrote: > Hi, > > I am having some trouble establishing how to use > matplotlib.scale.SymmetricalLogScale() to draw a log scale on the > positive and negative axis of a plot. Assuming of course that is the > correct way to go about it > > The code at the moment I am looking at goes something like this, with > arbitrary data generated. I need SubplotHost for parasite axis later on. > > <><><> > > import matplotlib > import pylab > import numpy > from mpl_toolkits.axes_grid.parasite_axes import SubplotHost > > fig = pylab.figure(1) > main = SubplotHost(fig,111) > fig.add_subplot(main) > > x,y = [] > for i in range(100): > > y.append(numpy.random.rand()) > y.append(-numpy.random.rand()) > y.append(numpy.random.rand() * 100) > y.append(-numpy.random.rand() * 100) > > > x = range(len(y)) > > main.plot(x,y) > > <><><> > > At this point I was expecting to be able to run with > SymmetricalLogScale in the same way main.set_yscale('log') transforms > after the plot but could not work out how to transform it other than: > > <><><> > main.yaxis = matplotlib.scale.SymmetricalLogScale(main.yaxis) > <><><> > > But that obviously didnt work, since SymmetricalLogScale doesnt have > get_scale > > If anyone could shed some light on the way to invoke this I'd be much > obliged!? I havent been able to find an example of it's usage anywhere > > Cheers > > Jonny > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Albert K. <alb...@gm...> - 2011-08-22 22:01:16
|
As the subject states, I am trying to use a geotiff (shaded relief) that I have downloaded from seamless.usgs.gov as the background in a map. Mostly I am just confused about the seamless image projection and bounds. The metadata defines the latitude of the top and bottom, and longitude of the left and right sides. I assume that a mercator projection is what I should use, but I am not sure. The bounds of the image are also confusing, but they don't match the values specified in the metadata or the values that I requested. Any suggestions? Albert |
From: Stan W. <sta...@nr...> - 2011-08-22 21:06:21
|
import numpy as np import matplotlib.ticker as mticker class RStripScalarFormatter(mticker.ScalarFormatter): """ Formats as ScalarFormatter but without trailing zeros. The 'format' attribute of ScalarFormatter instances contains the basic number formatting as well as the formatting for TeX or MathText. Here we separate those into the 'format' and 'wrapformat' attributes, respectively. """ # Code adapted from mticker.ScalarFormatter. def __init__(self, useOffset=True, useMathText=False): mticker.ScalarFormatter.__init__( self, useOffset=useOffset, useMathText=useMathText ) if self._usetex: self.wrapformat = '$%s$' elif self._useMathText: self.wrapformat = '$\mathdefault{%s}$' else: self.wrapformat = '%s' def _set_format(self): # set the format string to format all the ticklabels # The floating point black magic (adding 1e-15 and formatting # to 8 digits) may warrant review and cleanup. locs = ( (np.asarray(self.locs) - self.offset) / 10**self.orderOfMagnitude ) + 1e-15 maxsigfigs = max( len(str('%1.8f' % loc).split('.')[1].rstrip('0')) for loc in locs ) self.format = '%1.' + str(maxsigfigs) + 'f' def pprint_val(self, x): xp = (x - self.offset) / 10**self.orderOfMagnitude if np.absolute(xp) < 1e-8: xp = 0 xpstr = ( (self.format % xp).rstrip('0').rstrip('.') or '0' ) # If nothing is left, it must've been zero. return self.wrapformat % xpstr if __name__ == '__main__': import matplotlib.pyplot as plt plt.plot([-0.005, 0.02]) axes = plt.gca() axes.yaxis.set_major_formatter(RStripScalarFormatter()) plt.show() |
From: Jeff K. <kl...@wi...> - 2011-08-22 19:23:28
|
On Sun, Aug 21, 2011 at 1:01 PM, Jouni K. Seppänen <jk...@ik...> wrote: > Jeff Klukas <kl...@wi...> writes: > >> File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/matplotlib/dviread.py", >> line 727, in _register >> assert encoding is None >> AssertionError > > This sounds like this issue: > https://github.com/matplotlib/matplotlib/issues/191 > > There is a workaround in git commit 708c451 (patch below), which you > could apply to your local copy of dviread. It works! Thanks for a simple fix. || Jeff Klukas, Research Assistant || Dept. of Physics, Univ. of Wisconsin || http://jeff.klukas.net |
From: Jakob G. <ga...@il...> - 2011-08-22 12:23:37
|
Hi, is there a way to define the line width in data units, i.e. no in screen based but in data coordinate system based units? This way the line thickness would scale during zooming (which is intended!). This way parallel areas would be much easier to plot. If this is not possible has anyone found a workaround the get something similar? Thanks Jakob |
From: CAB <ca...@ya...> - 2011-08-22 05:03:30
|
Hi, Eric, Yes, the code you sent works. Many thanks for your help! Chad ________________________________ From: Eric Firing <ef...@ha...> To: mat...@li... Sent: Sunday, August 21, 2011 2:05 PM Subject: Re: [Matplotlib-users] tkinter bug? That's probably why the button was commented out. I think the problem here is that using these gui toolkits is tricky, and the tk examples were never worked out adequately. There are various ways of putting a quit button back into the example. Try the one attached. If it works for you, I will make it replace the present example, and I will delete the embedding_in_tk2.py example because it adds nothing of interest. Eric |
From: Daniel O'C. <doc...@gs...> - 2011-08-22 03:29:34
|
On 22/08/2011, at 5:36, Benjamin Root wrote: > Ok, there has been a lot of useful discussion (for both MacOSX and Windows), but in the end, I want to know this: Is it possible for matplotlib to provide a single, recommended, fully-supported-by-us method for installing our package (possibly for each platform?). Could it be pip? Or some other option? > > It is kinda sad that the linux install instructions are easier than the other platform instructions, and I don't think we even provide a linux installer. It's pretty easy using MacPorts (thank you MacPorts maintainers :) sudo port install py27-matplotlib Obviously that doesn't help when building a dev version, although you can build out of tree ports. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C |
From: Benjamin R. <ben...@ou...> - 2011-08-21 20:07:01
|
Ok, there has been a lot of useful discussion (for both MacOSX and Windows), but in the end, I want to know this: Is it possible for matplotlib to provide a single, recommended, fully-supported-by-us method for installing our package (possibly for each platform?). Could it be pip? Or some other option? It is kinda sad that the linux install instructions are easier than the other platform instructions, and I don't think we even provide a linux installer. Ben Root |
From: Eric F. <ef...@ha...> - 2011-08-21 19:05:34
|
On 08/21/2011 05:54 AM, CAB wrote: > Hi, All, > > Sorry if this complaint appears twice on this list. > > I have been using Matplotlib for a while, and I'm getting to the point > where I'd like to embed the output in a Tk GUI application. I'm new to > Tkinter. Here is the problem. Using the script that's in the "examples" > page on the web documentation, I run "embedding_in_tk.py". That works. > But if I uncomment the Tkinter-style "Quit" button that is at the bottom > of this script, any attempt to quit using the Quit button causes the > following error: > > Fatal Python Error: PyEval_RestoreThread: NULL tstate That's probably why the button was commented out. I think the problem here is that using these gui toolkits is tricky, and the tk examples were never worked out adequately. There are various ways of putting a quit button back into the example. Try the one attached. If it works for you, I will make it replace the present example, and I will delete the embedding_in_tk2.py example because it adds nothing of interest. Eric > > I am using clean installs of Python 2.7, numpy 1.6.1, and matplotlib > 1.0.1 (all 32-bit versions running under a Win 7 64-bit OS). I have not > modified the matplotlibrc. Given that this is not working "out of the > box", I'm wondering if there is a bug in FigureCanvasTkAgg or the tkagg > backend in general. > > A look at the archives shows a user named Jakob having a similar > problem, but the solution (if any) was not posted. > > Any help on this front is appreciated. > > Chad > > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Tony Yu <ts...@gm...> - 2011-08-21 18:42:26
|
On Sun, Aug 21, 2011 at 2:13 PM, Jouni K. Seppänen <jk...@ik...> wrote: > Tony Yu <ts...@gm...> writes: > > > IOError: [Errno 4] Interrupted system call > > Sounds like http://bugs.python.org/issue1068268, which is supposed to > have been fixed. Which version of Python are you running? > Hi Jouni, That bug does sound similar. I'm running Python 2.6.1 (default in OSX 10.6), and it looks like this bug wasn't fixed until much later. I was planning to upgrade to OSX 10.7 soon, so I guess this should fix itself. Thanks for digging up the bug report! -Tony |
From: John H. <jd...@gm...> - 2011-08-21 18:34:11
|
On Sun, Aug 21, 2011 at 12:42 PM, Chris Withers <ch...@si...> wrote: > Hi All, > > The majority of the docs for matplotlib focus on making its behaviour > like that of Matlab, however, I'm looking to use it to generate graphs > for display by web apps. > > Where can I find good examples of doing this? > (ie: multi-threaded, multi-process apps which may by simulaneously > generating many plots for different users using different data) Check out this FAQ http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-web-application-server and the guide to the matplotlib OO heirachy http://matplotlib.sourceforge.net/users/artists.html and all of the examples in the API directory http://matplotlib.sourceforge.net/examples/api/index.html which emphasize the OO API and avoid the state-machine of the pylab matlab-like interface JDH |
From: Benjamin R. <ben...@ou...> - 2011-08-21 18:23:57
|
On Sun, Aug 21, 2011 at 12:42 PM, Chris Withers <ch...@si...>wrote: > Hi All, > > The majority of the docs for matplotlib focus on making its behaviour > like that of Matlab, however, I'm looking to use it to generate graphs > for display by web apps. > > Where can I find good examples of doing this? > (ie: multi-threaded, multi-process apps which may by simulaneously > generating many plots for different users using different data) > > cheers, > > Chris > > Haven't tried it out myself, but you might want to check out the HTML5 backend that has been worked on by some members of the community: http://code.google.com/p/mplh5canvas/ I hope this helps! Ben Root |
From: Chris W. <ch...@si...> - 2011-08-21 18:19:43
|
Hi All, The majority of the docs for matplotlib focus on making its behaviour like that of Matlab, however, I'm looking to use it to generate graphs for display by web apps. Where can I find good examples of doing this? (ie: multi-threaded, multi-process apps which may by simulaneously generating many plots for different users using different data) cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk |
From: Jouni K. S. <jk...@ik...> - 2011-08-21 18:13:34
|
Tony Yu <ts...@gm...> writes: > IOError: [Errno 4] Interrupted system call Sounds like http://bugs.python.org/issue1068268, which is supposed to have been fixed. Which version of Python are you running? -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Jouni K. S. <jk...@ik...> - 2011-08-21 18:01:48
|
Jeff Klukas <kl...@wi...> writes: > File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/matplotlib/dviread.py", > line 727, in _register > assert encoding is None > AssertionError This sounds like this issue: https://github.com/matplotlib/matplotlib/issues/191 There is a workaround in git commit 708c451 (patch below), which you could apply to your local copy of dviread. |
From: CAB <ca...@ya...> - 2011-08-21 15:55:04
|
Hi, All, Sorry if this complaint appears twice on this list. I have been using Matplotlib for a while, and I'm getting to the point where I'd like to embed the output in a Tk GUI application. I'm new to Tkinter. Here is the problem. Using the script that's in the "examples" page on the web documentation, I run "embedding_in_tk.py". That works. But if I uncomment the Tkinter-style "Quit" button that is at the bottom of this script, any attempt to quit using the Quit button causes the following error: Fatal Python Error: PyEval_RestoreThread: NULL tstate I am using clean installs of Python 2.7, numpy 1.6.1, and matplotlib 1.0.1 (all 32-bit versions running under a Win 7 64-bit OS). I have not modified the matplotlibrc. Given that this is not working "out of the box", I'm wondering if there is a bug in FigureCanvasTkAgg or the tkagg backend in general. A look at the archives shows a user named Jakob having a similar problem, but the solution (if any) was not posted. Any help on this front is appreciated. Chad |
From: cabraut <ca...@ya...> - 2011-08-21 03:06:25
|
Dear Jakob and Ben, I am seeing the same error. This is with a clean install of Python 2.7, numpy 1.6.1, and matplotlib 1.0.1 (all 32-bit versions running under a Win 7 64-bit OS). In fact, all I am doing to test this is to execute the 'embedding_in_tk.py' example that is on the examples web page, with the button calls at the end of the script uncommented. Any attempt to use that 'Quit' button causes the NULL tstate error. Any info on this would be appreciated. I'm not saying I'm an expert, but given that this isn't working "out of the box," it appears to be a bug. Chad Benjamin Root-2 wrote: > > On Wed, Aug 3, 2011 at 3:50 AM, Jakob123 > <jak...@is...>wrote: > >> >> Hej there! >> I am using PyPlot to draw onto a Tkinter GUI (in Python 2.6). Works fine, >> but when I close the window (root.destroy()) PyPlot apparently crashes >> with >> the error message "Fatal Python error: PyEval_RestoreThread: NULL tstate" >> (error 0x40000015). >> >> > Jakob, > > A little while back, we put out an important v1.0.1 release that addressed > many issues with the various backends. While I don't remember all of the > bugs it fixed, it may have fixed that one. I would suggest installing > that > version and seeing if it work for you. > > Ben Root > > > -- View this message in context: http://old.nabble.com/PyPlot-crashes-upon-closing-tp32184426p32304069.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Chris W. <ch...@si...> - 2011-08-21 00:08:38
|
On 07/08/2011 22:29, David Warde-Farley wrote: >> Secondly, once I've populated this, any good examples of how to turn it >> into a bar chart? (the simple bar chart would be number of sales on the >> y-axis, weeks before the event on the x-axis, however, what I'd then >> like to do is split each bar into chunks for each venue's sales, if that >> makes sense?) > > This might give you an example of what you need: > > http://matplotlib.sourceforge.net/examples/pylab_examples/bar_stacked.html > > but you'd be better off asking on matplotlib-users. Thanks, that was a good start. One question: How can I automatically get a list of colours for each bar? I don't know how many bars I'm going to have so I can't manually pick them... This feels like a common enough problem that I'm guessing there's a solution somewhere in matplotlib? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk |