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
(20) |
2
(16) |
3
(9) |
4
(12) |
5
(14) |
6
(22) |
|
7
(17) |
8
(33) |
9
(26) |
10
(32) |
11
(47) |
12
(26) |
13
(7) |
|
14
(24) |
15
(44) |
16
(42) |
17
(22) |
18
(31) |
19
(8) |
20
(4) |
|
21
(15) |
22
(27) |
23
(41) |
24
(33) |
25
(31) |
26
(24) |
27
(10) |
|
28
(20) |
|
|
|
|
|
|
|
From: Gökhan S. <gok...@gm...> - 2010-02-18 23:12:38
|
Thanks Michiel. "s" keystroke works perfectly now here (bringing the figure save dialog box) with Qt4Agg backend. On Thu, Feb 18, 2010 at 8:58 AM, Michiel de Hoon <mjl...@ya...>wrote: > I just uploaded a bugfix to the repository, using *args in all the > save_figure methods and removing the extra argument in the call to > save_Figure. > > --Michiel. > > --- On Wed, 2/17/10, John Hunter <jd...@gm...> wrote: > > > From: John Hunter <jd...@gm...> > > Subject: Re: [Matplotlib-users] Easy come easy go > > To: "Michiel de Hoon" <mjl...@ya...> > > Cc: mat...@li..., "David Arnold" < > dwa...@su...> > > Date: Wednesday, February 17, 2010, 9:16 AM > > On Wed, Feb 17, 2010 at 7:41 AM, > > Michiel de Hoon <mjl...@ya...> > > wrote: > > > An inconsistency in the definition of save_figure > > between different backends is causing this problem. > > > > > > The GTK backends use > > > def save_figure(self, button): > > > > > > but the tkagg, qt, qt4, and macosx backends use > > > def save_figure(self): > > > > > > so without the second argument. The line that is > > causing the error is > > > > > > > > self.canvas.toolbar.save_figure(self.canvas.toolbar) > > > > > > in backend_bases.py. This assumes that the save_figure > > method is defined as in the GTK backends. > > > > > > As far as I can tell, the GTK backend has the second > > argument because that is what pygtk passes when save_figure > > is called as a callback. The second argument is not actually > > used inside the method. > > > > > > So I would suggest the following: > > > > > > In backend_bases.py, change the offending line to > > > > > > self.canvas.toolbar.save_figure() > > > > > > and the backend_gtk, change the definition of the > > save_figure method to > > > > > > def save_figure(self, button-None): > > > > > > Any objections, anybody? > > > > > > The base class signature is > > > > def save_figure(self, *args): > > 'save the current figure' > > raise NotImplementedError > > > > But I think the problem is the line > > > > > > self.canvas.toolbar.save_figure(self.canvas.toolbar) > > > > it shouldn't be passing the toolbar in, but should just > > read > > > > self.canvas.toolbar.save_figure() > > > > We could make both changes -- make sure all the signatures > > of the > > derived classes comply with > > > > def save_figure(self, *args): > > > > and remove the self.canvas.toolbar argument from the > > save_figure call. > > > > Michiel, do you want to take the lead on this? > > > > JDH > > No? > > > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Gökhan |
|
From: Jakub N. <j.s...@go...> - 2010-02-18 23:08:50
|
Dear John and Eric, Thank you for the fast response. I'm using version 0.99.1.1 (to be exact), the MacOSX binary release for Python 2.5. The fix with path.simplify: False in matplotlibrc works perfectly! I googled quite a lot beforehand in order to find a fix for this issue, but obviously failed to find this bug. Once more thank you very much for the help. Cheers, Jakub On 18 Feb 2010, at 22:39, John Hunter wrote: > On Thu, Feb 18, 2010 at 4:19 PM, Jakub Nowacki > <j.s...@go...> wrote: >> Hi, >> >> I work with neural models and I have problem with plotting fast spiking data. The spikes on the plot appear to have different hight which changes when I for example resize the plot window. The same problem is with saving data into files, especially in vector formats. I found the information about changing the join style, it helps a bit (rounded is the best) but doesn't solve the problem. For raster formats the workaround is to save the data in higher resolution, using DPI option. Below I included links to examples. >> >> Normal example (100 DPI): >> https://docs.google.com/leaf?id=0B3NZY3443E1VY2JjNTc3MjAtZDI5NC00OThjLTgwY2EtNTVhMDVkZWQ2YzIw&hl=en >> >> Example 300 DPI: >> https://docs.google.com/leaf?id=0B3NZY3443E1VNDdkMzUzNzAtMjdmNC00NjFmLTliMzMtODE5MzExMmNjNjQz&hl=en >> >> The problem is vector files (I'm especially interested in EPS) ignore DPI option. I've experimented with different backends and the problem is persistent on GUI and 'file-writting' back ends. I also tested it on Linux and Mac, and the outcome does't change. Creating larger figures sometimes helps a bit but not always solve the problem. >> >> Just to mention that plotting this kind of data is possible 'out of the box' in Matlab or XPPAut (which is not the most fancy plotting tool) I get a proper outcome. Maybe there should be a option to plot raw data in some sense, or join style function that deals with such a plots in a proper fashion. >> >> If you need some additional information do not hesitate to ask. Thanks for the help in advance. > > > This is a known bug in the latest release of mpl that is fixed in svn. > We do need to get a new release out soon. > > It is easy to fix by uncomennting the > > path.simplify : False > > line in your matplotlibrc file (the default is True). Note that > path.simplify does work in the svn release of matplotlib -- it is > designed to reduce paths but be imperceptible to the eye at the > resolution plotted, but due to a bug in the released version it can > result in improper simplifications. > > > See http://matplotlib.sourceforge.net/users/customizing.html for > information on how to change your matplotlibrc settings. > > JDH |
|
From: John H. <jd...@gm...> - 2010-02-18 22:39:13
|
On Thu, Feb 18, 2010 at 4:19 PM, Jakub Nowacki <j.s...@go...> wrote: > Hi, > > I work with neural models and I have problem with plotting fast spiking data. The spikes on the plot appear to have different hight which changes when I for example resize the plot window. The same problem is with saving data into files, especially in vector formats. I found the information about changing the join style, it helps a bit (rounded is the best) but doesn't solve the problem. For raster formats the workaround is to save the data in higher resolution, using DPI option. Below I included links to examples. > > Normal example (100 DPI): > https://docs.google.com/leaf?id=0B3NZY3443E1VY2JjNTc3MjAtZDI5NC00OThjLTgwY2EtNTVhMDVkZWQ2YzIw&hl=en > > Example 300 DPI: > https://docs.google.com/leaf?id=0B3NZY3443E1VNDdkMzUzNzAtMjdmNC00NjFmLTliMzMtODE5MzExMmNjNjQz&hl=en > > The problem is vector files (I'm especially interested in EPS) ignore DPI option. I've experimented with different backends and the problem is persistent on GUI and 'file-writting' back ends. I also tested it on Linux and Mac, and the outcome does't change. Creating larger figures sometimes helps a bit but not always solve the problem. > > Just to mention that plotting this kind of data is possible 'out of the box' in Matlab or XPPAut (which is not the most fancy plotting tool) I get a proper outcome. Maybe there should be a option to plot raw data in some sense, or join style function that deals with such a plots in a proper fashion. > > If you need some additional information do not hesitate to ask. Thanks for the help in advance. This is a known bug in the latest release of mpl that is fixed in svn. We do need to get a new release out soon. It is easy to fix by uncomennting the path.simplify : False line in your matplotlibrc file (the default is True). Note that path.simplify does work in the svn release of matplotlib -- it is designed to reduce paths but be imperceptible to the eye at the resolution plotted, but due to a bug in the released version it can result in improper simplifications. See http://matplotlib.sourceforge.net/users/customizing.html for information on how to change your matplotlibrc settings. JDH |
|
From: Eric F. <ef...@ha...> - 2010-02-18 22:38:05
|
Jakub Nowacki wrote: > Hi, > > I work with neural models and I have problem with plotting fast spiking data. The spikes on the plot appear to have different hight which changes when I for example resize the plot window. The same problem is with saving data into files, especially in vector formats. I found the information about changing the join style, it helps a bit (rounded is the best) but doesn't solve the problem. For raster formats the workaround is to save the data in higher resolution, using DPI option. Below I included links to examples. > This sounds like a problem with the path simplification algorithm. If so, the question is whether it is a bug that has been fixed or a new bug. What mpl version are you using? Can you build and install from svn? Eric > Normal example (100 DPI): > https://docs.google.com/leaf?id=0B3NZY3443E1VY2JjNTc3MjAtZDI5NC00OThjLTgwY2EtNTVhMDVkZWQ2YzIw&hl=en > > Example 300 DPI: > https://docs.google.com/leaf?id=0B3NZY3443E1VNDdkMzUzNzAtMjdmNC00NjFmLTliMzMtODE5MzExMmNjNjQz&hl=en > > The problem is vector files (I'm especially interested in EPS) ignore DPI option. I've experimented with different backends and the problem is persistent on GUI and 'file-writting' back ends. I also tested it on Linux and Mac, and the outcome does't change. Creating larger figures sometimes helps a bit but not always solve the problem. > > Just to mention that plotting this kind of data is possible 'out of the box' in Matlab or XPPAut (which is not the most fancy plotting tool) I get a proper outcome. Maybe there should be a option to plot raw data in some sense, or join style function that deals with such a plots in a proper fashion. > > If you need some additional information do not hesitate to ask. Thanks for the help in advance. > > Cheers, > > Jakub |
|
From: John H. <jd...@gm...> - 2010-02-18 22:29:20
|
On Thu, Feb 18, 2010 at 4:06 PM, Jan Strube <cur...@gm...> wrote: > Hi John, > thanks for trying this also. Yes, I think it's a bug that not the scale is > log, but the data is. > Unfortunately, the solution really doesn't work for me. > Please see the attached screenshot. (Yes, it still says log_10 entries, but > the code is otherwise the same) > In [2]: matplotlib.__version__ > Out[2]: '1.0.svn' > This is r8063, I think. > Strange that I get different results. Could this be a backend problem? I use > PyQT4. > I'd be happy to also update from svn if you think that helps. I'm running svn but not svn HEAD -- you should try updating to HEAD and I will do the same later (unfortunately HEAD is broken on my work machine (solaris, python2.4) because of the CXX upgrade I put in some time ago. I think I am on r8083. I do not think this difference could be caused by a backend or GUI version difference as all of the formatting logic happens in the frontend. If we are on the same version of svn, we should be getting the same tick labels. JDH |
|
From: Jakub N. <j.s...@go...> - 2010-02-18 22:19:49
|
Hi, I work with neural models and I have problem with plotting fast spiking data. The spikes on the plot appear to have different hight which changes when I for example resize the plot window. The same problem is with saving data into files, especially in vector formats. I found the information about changing the join style, it helps a bit (rounded is the best) but doesn't solve the problem. For raster formats the workaround is to save the data in higher resolution, using DPI option. Below I included links to examples. Normal example (100 DPI): https://docs.google.com/leaf?id=0B3NZY3443E1VY2JjNTc3MjAtZDI5NC00OThjLTgwY2EtNTVhMDVkZWQ2YzIw&hl=en Example 300 DPI: https://docs.google.com/leaf?id=0B3NZY3443E1VNDdkMzUzNzAtMjdmNC00NjFmLTliMzMtODE5MzExMmNjNjQz&hl=en The problem is vector files (I'm especially interested in EPS) ignore DPI option. I've experimented with different backends and the problem is persistent on GUI and 'file-writting' back ends. I also tested it on Linux and Mac, and the outcome does't change. Creating larger figures sometimes helps a bit but not always solve the problem. Just to mention that plotting this kind of data is possible 'out of the box' in Matlab or XPPAut (which is not the most fancy plotting tool) I get a proper outcome. Maybe there should be a option to plot raw data in some sense, or join style function that deals with such a plots in a proper fashion. If you need some additional information do not hesitate to ask. Thanks for the help in advance. Cheers, Jakub |
|
From: Christopher B. <Chr...@no...> - 2010-02-18 22:01:27
|
Werner F. Bruhin wrote: > Using numpy with "/arch nosse" solved the issue. > > Probably OT here, but does anyone know if numpy will in the future be > able to dynamically switch on/off the SSEx support? not unless atlas grows that capability. atlas has to be built with particular features turned on or off at compile time. Intel has a lapack that can dynamically select processors, but it's not open-source, and there are licensing issues to re-distributing it. -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... |
|
From: Stan W. <sta...@nr...> - 2010-02-18 21:48:38
|
> From: C M [mailto:cmp...@gm...]
> Sent: Friday, February 12, 2010 17:15
>
> I would like to understand your approach better. So far, I can't get
> your code to produce the "margins" indicated--but I'm probably
> applying it wrongly. I don't know how to force an autoscale, for
> example. Your code is tough for me to understand because there are a
> number of things you make use of that I'm not familiar with yet. I
> could ask a number of questions but don't want to burden the list with
> that unless people are up for it.
Okay. The basic idea is that axes.autoscale_view(tight=False) already has the
capacity to obtain whatever view limits are returned by each axis' major tick
locator, so we don't need to alter the autoscale_view code within matplotlib;
we just implement a locator that yields limits we like. I based my locator on
MaxNLocator, but you could use a different base. Only two methods inherited
from MaxNLocator need to be modified -- the __init__ method to store the
margin, and the view_limits method to implement the looser limits. We attach
an instance of the locator to an axis using the axis' set_major_locator
method, and if we've already plotted and need to autoscale, we invoke
axes.autoscale_view. To later change the margin (or the parameters handled by
MaxNLocator), we can attach a new instance.
I updated my code for matplotlib 0.99.1, added some comments and examples, and
have attached it below. I hope it's helpful as an example.
----
import numpy as np
import matplotlib as mpl
import matplotlib.ticker as mticker
import matplotlib.transforms as mtransforms
class LooseMaxNLocator(mticker.MaxNLocator):
"""
Select no more than N intervals at nice locations with view
limits loosely fitted to the data. Unlike MaxNLocator, the
view limits do not necessarily coincide with tick locations.
"""
def __init__(self, margin = 0.0, **kwargs):
"""
Keyword arguments:
*margin*
Specifies the minimum size of both the lower and upper
margins (between the view limits and the data limits) as
a fraction of the data range. Must be non-negative.
Remaining keyword arguments are passed to MaxNLocator.
"""
mticker.MaxNLocator.__init__(self, **kwargs)
if margin < 0:
raise ValueError('The margin must be non-negative.')
self._margin = margin
def view_limits(self, dmin, dmax):
# begin partial duplication of MaxNLocator.view_limits
if self._symmetric:
maxabs = max(abs(dmin), abs(dmax))
dmin = -maxabs
dmax = maxabs
dmin, dmax = mtransforms.nonsingular(dmin, dmax, expander=0.05)
# end duplication
margin = self._margin * (dmax - dmin) # fraction of data range
vmin = dmin - margin # expand the view
vmax = dmax + margin
bin_boundaries = self.bin_boundaries(vmin, vmax)
# locate ticks with MaxNLocator
# Note: If the lines below change vmin or vmax, the bin boundaries
# later calculated by MaxNLocator.__call__ may differ from those
# calculated here.
vmin = min(vmin, max(bin_boundaries[bin_boundaries <= dmin]))
# expand view to the highest tick below or touching the data
vmax = max(vmax, min(bin_boundaries[bin_boundaries >= dmax]))
# expand view to the lowest tick above or touching the data
return np.array([vmin, vmax])
# Examples
import matplotlib.pyplot as plt
fig1 = plt.figure()
ax1 = fig1.add_subplot(1, 1, 1)
ax1.set_xlabel('default locator')
ax1.set_ylabel('LooseMaxNLocator')
ax1.yaxis.set_major_locator(
LooseMaxNLocator(nbins=9, steps=[1, 2, 5, 10], margin=0.125))
# Set our locator before we plot.
ax1.plot([0, 0.95], [0, 0.95]) # Our locator's view limits are used.
fig2 = plt.figure()
ax2 = fig2.add_subplot(1, 1, 1)
ax2.set_xlabel('default locator')
ax2.set_ylabel('LooseMaxNLocator')
ax2.plot([0, 1.05], [0, 1.05]) # The default locator's view limits are used.
ax2.yaxis.set_major_locator(
LooseMaxNLocator(nbins=9, steps=[1, 2, 5, 10], margin=0.125))
# Now set our locator.
ax2.autoscale_view() # Autoscale activates our locator's view limits.
|
|
From: Werner F. B. <wer...@fr...> - 2010-02-18 21:42:07
|
Using numpy with "/arch nosse" solved the issue.
Probably OT here, but does anyone know if numpy will in the future be
able to dynamically switch on/off the SSEx support?
Werner
On 18/02/2010 17:31, Werner F. Bruhin wrote:
> On 18/02/2010 15:12, Werner F. Bruhin wrote:
>
>> Hi Everyone,
>>
>> On 08/10/2009 06:54, Ros...@ga... wrote:
>>
>>
>>> Hi Listers,
>>>
>>> I recently installed matplotlib 0.99.1 hoping to use mplot3d. However, when doing 'from mpl_toolkits.mplot3d import Axes3D' python itself crashes. Reinstalling matplotlib 0.98.5 gets everything working fine, without mplot3d, of course.
>>>
>>> I am running Windows XP, python 2.5.2 and numpy 1.2.1. From the installation instructions I think I have all the prerequisites.
>>>
>>> Has anyone seen behaviour like this?
>>>
>>>
>>>
>> It looks like I run into a similar issue on a client machine.
>>
>> He is on Windows XP SP 2 Suisse edition and he gets "Unhandled
>> Exception" error which does not show any traceback.
>>
>> My application is py2exe'd, so I did another build using 0.98.5 (both
>> with numpy 1.3, Python 2.5.4 and wxPython 2.8.10) but now at least we
>> get a traceback:
>>
>> Traceback (most recent call last):
>> File "appwine.pyo", line 939, in OnToolbarChart
>> File "zipextimporter.pyo", line 82, in load_module
>> File "frameplotmpl.pyo", line 24, in<module>
>> ImportError: cannot import name FigureCanvasWxAgg
>>
>> The relevant section of frameplotmpl.py is:
>> from numpy import arange, sin, pi
>> import matplotlib as mpl
>> # following is already done on stats page
>> ##mpl.use('WXAgg')
>> from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
>> from matplotlib.backends.backend_wx import NavigationToolbar2Wx
>> from matplotlib.dates import YearLocator, MonthLocator, DateFormatter
>> from matplotlib.ticker import FormatStrFormatter
>> from matplotlib.font_manager import FontProperties
>>
>> What is really strange I can run the same .exe on my XP test machine which is running XP SP2 English without any problems.
>>
>> I know there is not much to go by here, but would very much appreciate if anyone has some hints/tips on what I should look at (note that the client is non technical and I have no access to his machine).
>>
>>
>>
> The user has an AMD CPU, could this be related to the numpy issue with
> AMD machines?
>
> Werner
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
|
|
From: Abhishek T. <abh...@gm...> - 2010-02-18 21:29:15
|
Hi everyone,
I am very new to Python and Matplotlib, so it might be easier than I
think. I am doing something like this:
y = np.zeros((len(array1),len(array2)), dtype=float)
for i in range(len(y)):
y[i][i]= array2[i]
for i in range(len(y)):
plt.plot(array1, y[i])
#plt.savefig(filename)
plt.show()
where array1 and array2 are one dimensional, all elements with data type
float. y [i] has all elements zero except one.
My configuration is:
Executing on ('Linux', 'Lap', '2.6.31-19-generic-pae', '#56-Ubuntu SMP Thu
Jan 28 02:29:51 UTC 2010', 'i686')
Python version 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1]
matplotlib version 0.99.0
and I am getting following error:
Traceback (most recent call last):
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__
return self.func(*args)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py",
line 212, in resize
self.show()
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py",
line 215, in draw
FigureCanvasAgg.draw(self)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py",
line 314, in draw
self.figure.draw(self.renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 774, in
draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1721, in draw
a.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 742, in draw
tick.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 196, in draw
self.label1.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/text.py", line 565, in draw
ismath=ismath)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py",
line 134, in draw_text
self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1,
angle, gc)
ValueError: cannot convert float NaN to integer
I am not sure what is going wrong, I checked the data types several times
but no clue.
Many thanks
Abhishek
|
|
From: Ben A. <BAx...@co...> - 2010-02-18 20:05:25
|
I think I found a bug in how scatter() handles the alpha transparency of the plotted points. If the color array passed in is composed of integers, then the alpha is applied to the points like it should. But if the color array is floats, then the alpha parameter is ignored. Here is some sample code to demonstrate. I tested with the latest svn code.
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter([1,2,3,4], [1,2,3,4])
#alpha ignored
ax.scatter([1,2], [1,2],
s = 120,
c = [(1.0, 0.0, 0.0, 1.0), (0.0, 1.0, 0.0, 1.0)],
edgecolor = 'none',
alpha = 0.4)
#alpha used
ax.scatter([3,4], [3,4],
s = 120,
c = [(1, 0, 0, 1), (0, 1, 0, 1)],
edgecolor = 'none',
alpha = 0.4)
plt.show()
Thanks,
-Ben
|
|
From: Eric F. <ef...@ha...> - 2010-02-18 18:56:19
|
Danny Handoko wrote: > Dear matplotlib community, > > We recently did an upgrade to matplotlib 0.99.0 from 0.91.2. > We noticed that some semilog graphic we previously created are suddenly > no longer visible. After some searching we found out that when the x > data contains a 0.0 value and we perform a semilogx(), the figure shows > a nice white surface, without any warning/error. In the previous > version it was apparently silently ignored so that the graphic with the > other 8000+ data points is still visible. > > Is this by design or is it a bug? If it is by design then we expect > some clear warnings/error message instead of silently performing a > disappearing trick :) > > Shall I report this as a bug in the tracker? It must have been a bug that was fixed; semilogx(arange(10), arange(10)) produces a curve with svn mpl. I hope you can update to a newer version. Eric > > greetings, > > > Danny Handoko > > -- The information contained in this communication and any attachments > is confidential and may be privileged, and is for the sole use of the > intended recipient(s). Any unauthorized review, use, disclosure or > distribution is prohibited. Unless explicitly stated otherwise in the > body of this communication or the attachment thereto (if any), the > information is provided on an AS-IS basis without any express or implied > warranties or liabilities. To the extent you are relying on this > information, you are doing so at your own risk. If you are not the > intended recipient, please notify the sender immediately by replying to > this message and destroy all copies of this message and any attachments. > ASML is neither liable for the proper and complete transmission of the > information contained in this communication, nor for any delay in its > receipt. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Eric F. <ef...@ha...> - 2010-02-18 18:21:05
|
David Arnold wrote: > All, > > In the code on: > > http://matplotlib.sourceforge.net/examples/api/bbox_intersect.html > > I think I've figured out that: > > vertices = (np.random.random((4, 2))-0.5)*6.0 > vertices = np.ma.masked_array(vertices, [[False, False], [True, True], [False, False], [False, False]]) > > prevents the second of four random vertices from being used. But I'm not sure why > > plot(vertices[:, 0], vertices[:, 1], color=color) > > seems to connect only two points for a line segment. A missing point is a gap in the line, by design. If you use markers, 3 points will be plotted, but there are only two adjacent points, so only one line segment. Eric > > Can someone explain? > > D. > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: John H. <jd...@gm...> - 2010-02-18 17:42:21
|
On Thu, Feb 18, 2010 at 10:25 AM, Jan Strube <cur...@gm...> wrote:
> Hi Eric,
> thanks for your response.
>
> Your solution looks like it's going to return the right numbers, but for
> some reason the tick labels are gone completely. (Except 0)
>
> The code I have is below. I do think the current behavior is a bug, but if I
> can get your workaround to go, I'll be happy.
What's the bug -- the fact that the tick labels are the log10 of the
number instead of the number?
I tried Eric's proposal with your code and it is working for me
(colorbar tick labels at 1, 10 and 100)
JDH
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import LogFormatter
class LogFormatterHB(LogFormatter):
def __call__(self, v, pos=None):
vv = self._base ** v
return LogFormatter.__call__(self, vv, pos)
data = np.load('deltaR_parton_jet_109371.npz')
ptcut = np.logical_and(data['jetMomentum'] < 300000, data['jetMomentum']>0)
deltaRCut = data['deltaR']>0
cut = np.logical_and(ptcut, deltaRCut)
fig = plt.figure()
plt.hexbin(data['jetMomentum'][cut] / 1000, data['deltaR'][cut],
gridsize=50, bins='log')
plt.title('deltaR between parton(eta<2.5) and jet(eta<2.5)')
plt.xlabel('jet pt (GeV)')
plt.ylabel('deltaR')
cb = plt.colorbar(format=LogFormatterHB())
cb.set_label('# entries')
plt.show()
|
|
From: John H. <jd...@gm...> - 2010-02-18 17:21:45
|
On Thu, Feb 18, 2010 at 2:01 AM, yogesh karpate <yog...@gm...> wrote: > Dear All, > I am facing one peculiar problem. I have ecg data of 2000 > points . I can plot it,but i want to plot the data on image . Kindly find > the attched image with this mail to get my problem.How should I go ahead. > Thanx in advance. See the following demo, where some marker data (representing ECOG electrodes) is plotted over a CT image http://matplotlib.sourceforge.net/examples/pylab_examples/image_demo2.html JDH |
|
From: Ryan M. <rm...@gm...> - 2010-02-18 17:00:08
|
On Wed, Feb 17, 2010 at 6:44 PM, David Arnold <dwa...@su...> wrote: > All, > > I'm looking at: > > http://matplotlib.sourceforge.net/examples/api/clippath_demo.html > > But I cannot figure out: > > patch=patches.Circle((300, 300), radius=100) > > Where precisely is (300,300)? I believe it's in window coordinates (pixels), with 0,0 being the lower left. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Werner F. B. <wer...@fr...> - 2010-02-18 16:32:20
|
On 18/02/2010 15:12, Werner F. Bruhin wrote:
> Hi Everyone,
>
> On 08/10/2009 06:54, Ros...@ga... wrote:
>
>> Hi Listers,
>>
>> I recently installed matplotlib 0.99.1 hoping to use mplot3d. However, when doing 'from mpl_toolkits.mplot3d import Axes3D' python itself crashes. Reinstalling matplotlib 0.98.5 gets everything working fine, without mplot3d, of course.
>>
>> I am running Windows XP, python 2.5.2 and numpy 1.2.1. From the installation instructions I think I have all the prerequisites.
>>
>> Has anyone seen behaviour like this?
>>
>>
> It looks like I run into a similar issue on a client machine.
>
> He is on Windows XP SP 2 Suisse edition and he gets "Unhandled
> Exception" error which does not show any traceback.
>
> My application is py2exe'd, so I did another build using 0.98.5 (both
> with numpy 1.3, Python 2.5.4 and wxPython 2.8.10) but now at least we
> get a traceback:
>
> Traceback (most recent call last):
> File "appwine.pyo", line 939, in OnToolbarChart
> File "zipextimporter.pyo", line 82, in load_module
> File "frameplotmpl.pyo", line 24, in<module>
> ImportError: cannot import name FigureCanvasWxAgg
>
> The relevant section of frameplotmpl.py is:
> from numpy import arange, sin, pi
> import matplotlib as mpl
> # following is already done on stats page
> ##mpl.use('WXAgg')
> from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
> from matplotlib.backends.backend_wx import NavigationToolbar2Wx
> from matplotlib.dates import YearLocator, MonthLocator, DateFormatter
> from matplotlib.ticker import FormatStrFormatter
> from matplotlib.font_manager import FontProperties
>
> What is really strange I can run the same .exe on my XP test machine which is running XP SP2 English without any problems.
>
> I know there is not much to go by here, but would very much appreciate if anyone has some hints/tips on what I should look at (note that the client is non technical and I have no access to his machine).
>
>
The user has an AMD CPU, could this be related to the numpy issue with
AMD machines?
Werner
|
|
From: Michiel de H. <mjl...@ya...> - 2010-02-18 14:58:27
|
I just uploaded a bugfix to the repository, using *args in all the save_figure methods and removing the extra argument in the call to save_Figure.
--Michiel.
--- On Wed, 2/17/10, John Hunter <jd...@gm...> wrote:
> From: John Hunter <jd...@gm...>
> Subject: Re: [Matplotlib-users] Easy come easy go
> To: "Michiel de Hoon" <mjl...@ya...>
> Cc: mat...@li..., "David Arnold" <dwa...@su...>
> Date: Wednesday, February 17, 2010, 9:16 AM
> On Wed, Feb 17, 2010 at 7:41 AM,
> Michiel de Hoon <mjl...@ya...>
> wrote:
> > An inconsistency in the definition of save_figure
> between different backends is causing this problem.
> >
> > The GTK backends use
> > def save_figure(self, button):
> >
> > but the tkagg, qt, qt4, and macosx backends use
> > def save_figure(self):
> >
> > so without the second argument. The line that is
> causing the error is
> >
> >
> self.canvas.toolbar.save_figure(self.canvas.toolbar)
> >
> > in backend_bases.py. This assumes that the save_figure
> method is defined as in the GTK backends.
> >
> > As far as I can tell, the GTK backend has the second
> argument because that is what pygtk passes when save_figure
> is called as a callback. The second argument is not actually
> used inside the method.
> >
> > So I would suggest the following:
> >
> > In backend_bases.py, change the offending line to
> >
> > self.canvas.toolbar.save_figure()
> >
> > and the backend_gtk, change the definition of the
> save_figure method to
> >
> > def save_figure(self, button-None):
> >
> > Any objections, anybody?
>
>
> The base class signature is
>
> def save_figure(self, *args):
> 'save the current figure'
> raise NotImplementedError
>
> But I think the problem is the line
>
>
> self.canvas.toolbar.save_figure(self.canvas.toolbar)
>
> it shouldn't be passing the toolbar in, but should just
> read
>
> self.canvas.toolbar.save_figure()
>
> We could make both changes -- make sure all the signatures
> of the
> derived classes comply with
>
> def save_figure(self, *args):
>
> and remove the self.canvas.toolbar argument from the
> save_figure call.
>
> Michiel, do you want to take the lead on this?
>
> JDH
> No?
>
|
|
From: Werner F. B. <wer...@fr...> - 2010-02-18 14:13:19
|
Hi Everyone,
On 08/10/2009 06:54, Ros...@ga... wrote:
> Hi Listers,
>
> I recently installed matplotlib 0.99.1 hoping to use mplot3d. However, when doing 'from mpl_toolkits.mplot3d import Axes3D' python itself crashes. Reinstalling matplotlib 0.98.5 gets everything working fine, without mplot3d, of course.
>
> I am running Windows XP, python 2.5.2 and numpy 1.2.1. From the installation instructions I think I have all the prerequisites.
>
> Has anyone seen behaviour like this?
>
It looks like I run into a similar issue on a client machine.
He is on Windows XP SP 2 Suisse edition and he gets "Unhandled
Exception" error which does not show any traceback.
My application is py2exe'd, so I did another build using 0.98.5 (both
with numpy 1.3, Python 2.5.4 and wxPython 2.8.10) but now at least we
get a traceback:
Traceback (most recent call last):
File "appwine.pyo", line 939, in OnToolbarChart
File "zipextimporter.pyo", line 82, in load_module
File "frameplotmpl.pyo", line 24, in<module>
ImportError: cannot import name FigureCanvasWxAgg
The relevant section of frameplotmpl.py is:
from numpy import arange, sin, pi
import matplotlib as mpl
# following is already done on stats page
##mpl.use('WXAgg')
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wx import NavigationToolbar2Wx
from matplotlib.dates import YearLocator, MonthLocator, DateFormatter
from matplotlib.ticker import FormatStrFormatter
from matplotlib.font_manager import FontProperties
What is really strange I can run the same .exe on my XP test machine which is running XP SP2 English without any problems.
I know there is not much to go by here, but would very much appreciate if anyone has some hints/tips on what I should look at (note that the client is non technical and I have no access to his machine).
Werner
|
|
From: Wolfgang K. <wke...@go...> - 2010-02-18 14:06:42
|
That is really awesome, I wrote myself a little script today using the
poly_editor, data browser and the widgets. This is really cool.
I have one problem however, with the widgets I have buttons to switch
between different data sets and like in the button demo i just update the
plotdata rather than creating a new plot object. I then try to
ax.autoscale_view, but that doesnt do anything even after a
fig.canvas.draw() update. any ideas?
Cheers
Wolfgang
On Thu, Feb 18, 2010 at 1:18 AM, John Hunter <jd...@gm...> wrote:
> On Wed, Feb 17, 2010 at 7:42 AM, Wolfgang Kerzendorf
> <wke...@go...> wrote:
> > Hello,
> >
> > I would like to build a bit of an interactive fitter with matplotlib and
> ipython (in pylab environment). I would like to have a a function, which
> takes x and y as input, then plots these and fits a line to it (just numpy
> polyfit). if I click a point it will be removed from the fit pool and the
> line will be refitted (optionally after pressing 'f'). when I'm done I can
> press 'q' or close the window and the function will come to an end and spit
> out the fitting parameter.
> > I tried this a year or two ago and I had terrible problems with getting
> stopping the event loop and waiting for the interactive part to finish and
> then finish the function. I'm running os 10.6 and use the wx backend (or mac
> os x, if that's easier). Can you point me to an example or give me a crude
> overview of how to do that in the right way. Is that understandable?
>
> Take a look at
>
>
> http://matplotlib.sourceforge.net/examples/event_handling/poly_editor.html
>
> You can use the 'i' and 'd' keys to insert and delete vertexes, can
> click and drag them to move them.
>
> See also the event handling tutorial at
>
> http://matplotlib.sourceforge.net/users/event_handling.html
>
>
> JDH
>
|
|
From: Danny H. <dan...@as...> - 2010-02-18 09:31:27
|
Dear matplotlib community, We recently did an upgrade to matplotlib 0.99.0 from 0.91.2. We noticed that some semilog graphic we previously created are suddenly no longer visible. After some searching we found out that when the x data contains a 0.0 value and we perform a semilogx(), the figure shows a nice white surface, without any warning/error. In the previous version it was apparently silently ignored so that the graphic with the other 8000+ data points is still visible. Is this by design or is it a bug? If it is by design then we expect some clear warnings/error message instead of silently performing a disappearing trick :) Shall I report this as a bug in the tracker? greetings, Danny Handoko -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. |
|
From: Philipp B. <li...@ro...> - 2010-02-18 07:12:48
|
The easiest way is to check out the SVN / git repo, make the changes and create a patch according to the instructuins here: http://matplotlib.sourceforge.net/faq/howto_faq.html#submit-a-patch Best regards Philipp |
|
From: David A. <dwa...@su...> - 2010-02-18 02:34:22
|
All, I'm looking at: http://matplotlib.sourceforge.net/examples/api/clippath_demo.html But I cannot figure out: patch=patches.Circle((300, 300), radius=100) Where precisely is (300,300)? D. |
|
From: David A. <dwa...@su...> - 2010-02-18 02:34:18
|
All, In the code on: http://matplotlib.sourceforge.net/examples/api/bbox_intersect.html I think I've figured out that: vertices = (np.random.random((4, 2))-0.5)*6.0 vertices = np.ma.masked_array(vertices, [[False, False], [True, True], [False, False], [False, False]]) prevents the second of four random vertices from being used. But I'm not sure why plot(vertices[:, 0], vertices[:, 1], color=color) seems to connect only two points for a line segment. Can someone explain? D. |