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
(16) |
2
(16) |
3
(5) |
|
4
(4) |
5
(4) |
6
(10) |
7
(33) |
8
(11) |
9
(20) |
10
(7) |
|
11
(8) |
12
(18) |
13
(27) |
14
(21) |
15
(15) |
16
(10) |
17
(12) |
|
18
(3) |
19
(12) |
20
(12) |
21
(14) |
22
(32) |
23
(15) |
24
(20) |
|
25
(12) |
26
(32) |
27
(29) |
28
(17) |
29
(25) |
30
(12) |
31
(5) |
|
From: Eric F. <ef...@ha...> - 2010-07-26 23:32:41
|
On 07/26/2010 12:17 PM, David Mashburn wrote: > Ben and Eric, > > Thanks so much for your help! > > I'm trying to turn change some of the rcParams in my script... Here is a > test of what happens: > > import matplotlib > matplotlib.rcParams['keymap.fullscreen']='' > > Traceback (most recent call last): > File "<input>", line 1, in<module> > File "/usr/lib/pymodules/python2.6/matplotlib/__init__.py", line 623, > in __setitem__ > See rcParams.keys() for a list of valid parameters.'%key) > KeyError: 'keymap.fullscreen is not a valid rc parameter.See > rcParams.keys() for a list of valid parameters.' > > It seems that none of the keymap parameters are defined in my rcParams > dictionary... > > I also tried adding some of the "keymap" lines out of the online rc file: > http://matplotlib.sf.net/_static/matplotlibrc > to my rc file and it told me: Bad key "keymap.pan" > > I've got version 0.99.0 on ubuntu. Aha! I thought you were using 1.0. For 1.0, these things are rc settings; I had no idea they even existed back in 0.99.0. I only tripped over "f" very recently. The key bindings are coded in the key_press() method of FigureManagerBase. The callback is connected to the canvas in the __init__ method. The trick is to disconnect the callback: fig = figure() fig.canvas.mpl_disconnect(3) plot([1,2,3]) Now key presses have no effect in that figure. The bad thing here is that I used the cid 3, a seemingly random number. I suspect, though, that once you find out what it is in your version of mpl (and it may still be 3), you will be able to rely on it for your purposes. To find it, print out fig.canvas.callbacks.callbacks and look for key_press_event. You could have your program use this dictionary to look it up. Eric > > Is this a new feature? Do you know what I can try instead?? > > Thanks! > -David > > On 07/26/2010 10:18 AM, Benjamin Root wrote: >> On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn >> <dav...@gm...<mailto:dav...@gm...> <mailto:dav...@gm...<mailto:dav...@gm...>>> wrote: >> >> Hello! >> >> My name is David Mashburn, and I have been a very happy user of >> matplotlib for almost 5 years now, so let me start by saying thank you >> for this wonderful piece of software! I has been a blessing to me! >> >> I am creating a program that performs actions based on key commands in >> matplotlib, and I keep bumping into conflicts with the interactive >> keyboard navigation system. Is there any way to bypass or disable some >> or all of the keybindings hooked to interactive navigation? >> >> By the way, I'm using the WxAgg backend if that matters. >> >> Thanks! >> -David >> >> >> David, >> >> I have not tested this myself, but I believe that if you set >> "navigate=False" as a keyword argument for making your axes, this will >> stop the callbacks from being registered. > > That completely disables the toolbar, which is likely not what the OP wants. > > There are a bunch of rcParams, listed at the bottom of > matplotlibrc_template (and of the default matplotlibrc file that is > installed) that can be used to turn off the key bindings without > disabling the toolbar. > > Personally, I think that putting in all those key bindings by default > was a major mistake, one that should be reversed ASAP. Having the plot > jump to fullscreen when one bumps "f" is rude. The first time it > happened I had no idea what was going on or how to recover from it--I > thought maybe my X-server had gone bonkers. And does one actually save a > displayed figure so often that it is useful to have the "s" shortcut to > save one from having to click the toolbar button? I could go on with > this complaint... > > Eric > >> >> Thanks for using matplotlib! >> >> Ben Root >> > > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: David M. <dav...@gm...> - 2010-07-26 22:17:15
|
Ben and Eric,
Thanks so much for your help!
I'm trying to turn change some of the rcParams in my script... Here is a
test of what happens:
import matplotlib
matplotlib.rcParams['keymap.fullscreen']=''
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/matplotlib/__init__.py", line 623,
in __setitem__
See rcParams.keys() for a list of valid parameters.'%key)
KeyError: 'keymap.fullscreen is not a valid rc parameter.See
rcParams.keys() for a list of valid parameters.'
It seems that none of the keymap parameters are defined in my rcParams
dictionary...
I also tried adding some of the "keymap" lines out of the online rc file:
http://matplotlib.sf.net/_static/matplotlibrc
to my rc file and it told me: Bad key "keymap.pan"
I've got version 0.99.0 on ubuntu.
Is this a new feature? Do you know what I can try instead??
Thanks!
-David
On 07/26/2010 10:18 AM, Benjamin Root wrote:
> On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn
> <dav...@gm... <mailto:dav...@gm...> <mailto:dav...@gm... <mailto:dav...@gm...>>> wrote:
>
> Hello!
>
> My name is David Mashburn, and I have been a very happy user of
> matplotlib for almost 5 years now, so let me start by saying thank you
> for this wonderful piece of software! I has been a blessing to me!
>
> I am creating a program that performs actions based on key commands in
> matplotlib, and I keep bumping into conflicts with the interactive
> keyboard navigation system. Is there any way to bypass or disable some
> or all of the keybindings hooked to interactive navigation?
>
> By the way, I'm using the WxAgg backend if that matters.
>
> Thanks!
> -David
>
>
> David,
>
> I have not tested this myself, but I believe that if you set
> "navigate=False" as a keyword argument for making your axes, this will
> stop the callbacks from being registered.
That completely disables the toolbar, which is likely not what the OP wants.
There are a bunch of rcParams, listed at the bottom of
matplotlibrc_template (and of the default matplotlibrc file that is
installed) that can be used to turn off the key bindings without
disabling the toolbar.
Personally, I think that putting in all those key bindings by default
was a major mistake, one that should be reversed ASAP. Having the plot
jump to fullscreen when one bumps "f" is rude. The first time it
happened I had no idea what was going on or how to recover from it--I
thought maybe my X-server had gone bonkers. And does one actually save a
displayed figure so often that it is useful to have the "s" shortcut to
save one from having to click the toolbar button? I could go on with
this complaint...
Eric
>
> Thanks for using matplotlib!
>
> Ben Root
>
|
|
From: Eric F. <ef...@ha...> - 2010-07-26 21:16:44
|
On 07/26/2010 10:13 AM, Nikolaus Rath wrote: > Hello, > > I would like to draw a couple of contour plots. The plots are on > separate figures, but they should all have exactly the same color > mapping (i.e, the same Z value should correspond to the same color in > all plots). > > What's the best way to achieve this? I think that all you will need is to specify the same cmap (if you are not using the default) and contour levels for both plots. You should not need to use the norm, unless you are doing something fancy; and in that case, all you need to do is specify the same norm for both plots. The real key, though, is explicitly specifying the set of contour levels that you want, and using the same one for both plots. e.g.: from pylab import * # yes, this is not recommended... clevs = arange(0.3, 0.701, 0.1) fig1 = figure() contourf(rand(20,20), levels=clevs, extend='both') colorbar() fig2 = figure() contourf(rand(30,40), levels=clevs, extend='both') colorbar() show() You need to use the extend argument only if you want values beyond the levels you specify to constitute open-ended ranges. For example, if you have data values from 0 to 10, but most are between 4 and 6, you could specify levels as numpy.arange(4, 6.01, 0.1) and use extend='both'. Then all values greater than 6 would get a color at one end, and all values less than 4 would get another color at the other end. If you use a colorbar, it will see the extend argument that was used in contourf, and draw the colorbar with pointed ends to indicate "anything over" and "anything under". As illustrated above. Eric > > From the documentation I gather that I should use the norm and extend > keyword arguments, but I wasn't really able to figure out what values > I have to pass and how the matplotlib.colors.Normalize instance works. > > > Thanks, > > -Nikolaus > |
|
From: Eric F. <ef...@ha...> - 2010-07-26 20:54:23
|
On 07/26/2010 10:18 AM, Benjamin Root wrote: > On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn > <dav...@gm... <mailto:dav...@gm...>> wrote: > > Hello! > > My name is David Mashburn, and I have been a very happy user of > matplotlib for almost 5 years now, so let me start by saying thank you > for this wonderful piece of software! I has been a blessing to me! > > I am creating a program that performs actions based on key commands in > matplotlib, and I keep bumping into conflicts with the interactive > keyboard navigation system. Is there any way to bypass or disable some > or all of the keybindings hooked to interactive navigation? > > By the way, I'm using the WxAgg backend if that matters. > > Thanks! > -David > > > David, > > I have not tested this myself, but I believe that if you set > "navigate=False" as a keyword argument for making your axes, this will > stop the callbacks from being registered. That completely disables the toolbar, which is likely not what the OP wants. There are a bunch of rcParams, listed at the bottom of matplotlibrc_template (and of the default matplotlibrc file that is installed) that can be used to turn off the key bindings without disabling the toolbar. Personally, I think that putting in all those key bindings by default was a major mistake, one that should be reversed ASAP. Having the plot jump to fullscreen when one bumps "f" is rude. The first time it happened I had no idea what was going on or how to recover from it--I thought maybe my X-server had gone bonkers. And does one actually save a displayed figure so often that it is useful to have the "s" shortcut to save one from having to click the toolbar button? I could go on with this complaint... Eric > > Thanks for using matplotlib! > > Ben Root > |
|
From: Benjamin R. <ben...@ou...> - 2010-07-26 20:18:35
|
On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn <dav...@gm...>wrote: > Hello! > > My name is David Mashburn, and I have been a very happy user of > matplotlib for almost 5 years now, so let me start by saying thank you > for this wonderful piece of software! I has been a blessing to me! > > I am creating a program that performs actions based on key commands in > matplotlib, and I keep bumping into conflicts with the interactive > keyboard navigation system. Is there any way to bypass or disable some > or all of the keybindings hooked to interactive navigation? > > By the way, I'm using the WxAgg backend if that matters. > > Thanks! > -David > > David, I have not tested this myself, but I believe that if you set "navigate=False" as a keyword argument for making your axes, this will stop the callbacks from being registered. Thanks for using matplotlib! Ben Root |
|
From: Nikolaus R. <Nik...@ra...> - 2010-07-26 20:13:54
|
Hello, I would like to draw a couple of contour plots. The plots are on separate figures, but they should all have exactly the same color mapping (i.e, the same Z value should correspond to the same color in all plots). What's the best way to achieve this? >From the documentation I gather that I should use the norm and extend keyword arguments, but I wasn't really able to figure out what values I have to pass and how the matplotlib.colors.Normalize instance works. Thanks, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C |
|
From: eck n. <eck...@ho...> - 2010-07-26 20:09:21
|
Problem solved.
When I set up python on the Windows machine, I simply copied over the directories and everything in them from my Linux machine, including all of the python bytecode *.pyc files. Trying to run a script with those *.pyc files present was causing the problem as they were compiled on my Linux machine originally.
The matplotlib call works fine when I move the scripts to a clean folder.
Thanks
Alex
From: ben...@ou...
Date: Mon, 26 Jul 2010 09:56:27 -0500
Subject: Re: [Matplotlib-users] Import matplotlib.pyplot fails on windows XP
To: eck...@ho...
CC: mat...@li...
On Sat, Jul 24, 2010 at 4:57 AM, eck naysmith <eck...@ho...> wrote:
Hello,
I've installed the following Python packages on a Windows XP machine:
Python 2.6.5
Python 2.6 numpy-1.4.1
Python 2.6 matplotlib-0.99.3 [installer - matplotlib-0.99.3.win32-py2.6]
Python and Numpy work correctly. Matplotlib also works and as a test I tried successfully the following on the python interpretor:
from matplotlib.pyplot import *
plot([1,2,3])
show()
A graph then appears and thus so far so good.
However, when I try to run a certain python script, a problem occurs when importing from matplotlib:
Traceback (most recent
call last):
File
"C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in
<module>
from matplotlib.pyplot
import plot, ylabel,xlabel, show
File
"C:\Python26\lib\site-packages\matplotlib\pyplot.py", line
78, in <module>
new_figure_manager,
draw_if_interactive, show = pylab_setup()
File
"C:\Python26\lib\site-packages\matplotlib\backends\__init__.py",
line 25, in pylab_setup
globals(),locals(),[backend_name])
File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 7, in <module>
import Tkinter as Tk,
FileDialog
File
"C:\Python26\lib\lib-tk\FileDialog.py", line 12, in
<module>
from Dialog import
Dialog
File
"C:\Pythoncode\Games\Bridge_war_2\Dialog.py", line 2, in
<module>
import wx
ImportError: No module
named wx
The error is that your Windows XP box does not have the wxPython module installed for Windows.
http://www.wxpython.org/download.php
I hope that helps,
Ben Root
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now |
|
From: David M. <dav...@gm...> - 2010-07-26 20:09:20
|
Hello! My name is David Mashburn, and I have been a very happy user of matplotlib for almost 5 years now, so let me start by saying thank you for this wonderful piece of software! I has been a blessing to me! I am creating a program that performs actions based on key commands in matplotlib, and I keep bumping into conflicts with the interactive keyboard navigation system. Is there any way to bypass or disable some or all of the keybindings hooked to interactive navigation? By the way, I'm using the WxAgg backend if that matters. Thanks! -David |
|
From: Mathew Y. <mat...@gm...> - 2010-07-26 20:08:30
|
Is there a simple function call for this? And finding the distance of a point to the plane? -Mathew |
|
From: Benjamin R. <ben...@ou...> - 2010-07-26 20:03:02
|
On Mon, Jul 26, 2010 at 9:49 AM, Benjamin Root <ben...@ou...> wrote: > On Sat, Jul 24, 2010 at 1:51 PM, Josh Lawrence <jos...@gm...>wrote: > >> Hello, >> >> I looked on your website for the different line styles. In the >> documentation for matplotlib.lines.line2D.set_linestyle, the dashed >> linestyle is listed as '-' and not '--'. It it my understanding that >> dashed should be '--'. If I'm incorrect, sorry for the noise. >> >> Cheers, >> >> -- >> Josh Lawrence >> Ph.D. Student >> Clemson University >> >> >> > Looks like the formatter for the online documentation took the double-dash > to mean a "long line", much like how LaTeX does. Anybody know how to make > the double-dash appear as two distinct dashes? > > > http://matplotlib.sourceforge.net/api/artist_api.html?highlight=set_linestyle#matplotlib.lines.Line2D.set_linestyle > > Ben Root > > After some reading of sphinx documentation, it appears to be a bug with sphinx (or actually, "smartypants") because it should not be doing this sort of interpretation within a docstring. Anyway, supposedly the workaround is to put double backticks around the part that needs to be treated literally: ``'--'``. I tried this out and built the docs locally and it works... sort of. The text that is surrounded by double backticks are getting a different background color. This doesn't look great to me. Maybe someone else has a thought? Ben Root |
|
From: João L. S. <js...@fc...> - 2010-07-26 19:58:01
|
On 07/26/2010 08:18 PM, Timothy Vickery wrote: > Hi everyone, > > I'm new to matplotlib, and I would like to create a typical plot of a > timecourse (markers connected by lines), with the markers varying in > size and/or style according to a separate set of data that corresponds > to each timepoint. However, my understanding is that plot() will not > accept an array of marker sizes, only a single float value that is > applied to all markers. On the other hand, scatter() does allow > variably-sized markers (as in the scatter_demo2.py example). However, > there does not seem to be a straightforward way to add lines to this > plot connecting markers in sequence. Can anyone recommend a work-around > to this issue, or point out if I've missed something in the documentation? > > Thanks, > Tim > You could use plot and scatter on the same plot. See the attached example. #------------------------------------------- import numpy as np import matplotlib.pyplot as plt N = 100 x = np.linspace(-10.0,10.0,N) y = 50.0*np.exp(-x**2) size = 100.0*np.abs(np.sin(x)) plt.plot(x,y) plt.scatter(x,y,s=size) plt.show() #------------------------------------------- Regards, João Luís |
|
From: Benjamin R. <ben...@ou...> - 2010-07-26 19:57:04
|
On Mon, Jul 26, 2010 at 2:50 PM, Mathew Yeates <mat...@gm...> wrote: > Hi > Is there any way to let the user rotate a 3D plot? I don't see an > example which does this. > > -Mathew > > What do you mean? By default, all 3D plots are rotatable by merely clicking and draging the plot around. Or are you referring to how to set camera view points? Ben Root |
|
From: Mathew Y. <mat...@gm...> - 2010-07-26 19:50:42
|
Hi Is there any way to let the user rotate a 3D plot? I don't see an example which does this. -Mathew |
|
From: eck n. <eck...@ho...> - 2010-07-26 19:46:21
|
From: ben...@ou...
Date: Mon, 26 Jul 2010 09:56:27 -0500
Subject: Re: [Matplotlib-users] Import matplotlib.pyplot fails on windows XP
To: eck...@ho...
CC: mat...@li...
On Sat, Jul 24, 2010 at 4:57 AM, eck naysmith <eck...@ho...> wrote:
Hello,
I've installed the following Python packages on a Windows XP machine:
Python 2.6.5
Python 2.6 numpy-1.4.1
Python 2.6 matplotlib-0.99.3 [installer - matplotlib-0.99.3.win32-py2.6]
Python and Numpy work correctly. Matplotlib also works and as a test I tried successfully the following on the python interpretor:
from matplotlib.pyplot import *
plot([1,2,3])
show()
A graph then appears and thus so far so good.
However, when I try to run a certain python script, a problem occurs when importing from matplotlib:
Traceback (most recent
call last):
File
"C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in
<module>
from matplotlib.pyplot
import plot, ylabel,xlabel, show
File
"C:\Python26\lib\site-packages\matplotlib\pyplot.py", line
78, in <module>
new_figure_manager,
draw_if_interactive, show = pylab_setup()
File
"C:\Python26\lib\site-packages\matplotlib\backends\__init__.py",
line 25, in pylab_setup
globals(),locals(),[backend_name])
File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 7, in <module>
import Tkinter as Tk,
FileDialog
File
"C:\Python26\lib\lib-tk\FileDialog.py", line 12, in
<module>
from Dialog import
Dialog
File
"C:\Pythoncode\Games\Bridge_war_2\Dialog.py", line 2, in
<module>
import wx
ImportError: No module
named wx
The error is that your Windows XP box does not have the wxPython module installed for Windows.
http://www.wxpython.org/download.php
I hope that helps,
Ben Root
No calls are made anywhere for wxPython so I don't know why it is seeking it. But when I installed wxPython anyway just to see what would happen, the traceback then ends at the penultimate line shown above i.e
"File
"C:\Python26\lib\lib-tk\FileDialog.py", line 12, in
<module>
from Dialog import
Dialog"
On the Traceback, each line beggining with 'File "C:\Python26......." is a seperate error. The most significant error is the first one:
'Traceback (most recent
call last):
File
"C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in
<module>
from matplotlib.pyplot
import plot, ylabel,xlabel, show'
I suspected the problems were arising from the use of the statement 'from numpy import foobar' overwriting some of the names used by matplotlib, so I changed the import statement to 'import numpy' to avoid any potential namespace clash and adjusted the code accordingly. This does nothing and the exact same Traceback error messages occur.
Regards
Alex
_________________________________________________________________
http://clk.atdmt.com/UKM/go/195013117/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now |
|
From: Timothy V. <tim...@gm...> - 2010-07-26 19:18:37
|
Hi everyone, I'm new to matplotlib, and I would like to create a typical plot of a timecourse (markers connected by lines), with the markers varying in size and/or style according to a separate set of data that corresponds to each timepoint. However, my understanding is that plot() will not accept an array of marker sizes, only a single float value that is applied to all markers. On the other hand, scatter() does allow variably-sized markers (as in the scatter_demo2.py example). However, there does not seem to be a straightforward way to add lines to this plot connecting markers in sequence. Can anyone recommend a work-around to this issue, or point out if I've missed something in the documentation? Thanks, Tim |
|
From: Waléria A. D. <wal...@gm...> - 2010-07-26 17:21:43
|
I did what you showed me but the image disappears On Mon, Jul 26, 2010 at 2:06 PM, <PH...@ge...> wrote: > Replace this line: > > ax.plot(f/1000, Sserie) > > > > With this line: > > ax.plot(f/1000.0, Sserie) > > > > And tell us how things go. Python 2.6 distinguishes between integers and > floats very strictly. Hence: > > In [1]: 20/1000 > > Out[1]: 0 > > > > In [2]: 20.0/1000.0 > > Out[2]: 0.02 > > > > See the difference? > > -paul > > > > *From:* Waléria Antunes David [mailto:wal...@gm...] > *Sent:* Monday, July 26, 2010 10:01 AM > *To:* Angus McMorland > > *Cc:* mat...@li... > *Subject:* Re: [Matplotlib-users] Hz to KHz > > > > i don't understand.. > > On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...> > wrote: > > On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...> > wrote: > > My code like this in django: http://pastebin.com/nzM5jvuc > > Are you perhaps suffering from integer division? How about dividing by > 1000.0, instead of 1000? > > Angus. > > > > i'm lost > > > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: > >> > >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid > any > >> integer nonsense and make sure to reset your axis limits. > >> > >> > >> > >> Posting a small code snippet would help us get you on the right track. > >> > >> -p > >> > >> > >> > >> From: Waléria Antunes David [mailto:wal...@gm...] > >> Sent: Monday, July 26, 2010 9:32 AM > >> To: Matthieu Brucher > >> Cc: mat...@li... > >> Subject: Re: [Matplotlib-users] Hz to KHz > >> > >> > >> > >> I know...I tried but I'm using django and also when divided by 1000 the > >> image does not appear... > >> I don't know what to do.....help me.... > >> > >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher > >> <mat...@gm...> wrote: > >> > >> Hi, > >> > >> You may just divide them by 1000? > >> > >> Matthieu > >> > >> 2010/7/26 Waléria Antunes David <wal...@gm...>: > >> > >> > Hello all, > >> > > >> > I need to format the values of graphic to KHz.....my values are in Hz > >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 > , > >> > but > >> > I need to go where it will be displayed KHz: 3.0 3.1 > >> > > >> > can someone help me? > >> > >> > > >> > > ------------------------------------------------------------------------------ > >> > The Palm PDK Hot Apps Program offers developers who use the > >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > >> > of $1 Million in cash or HP Products. Visit us here for more details: > >> > http://ad.doubleclick.net/clk;226879339;13503038;l? > >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > >> > _______________________________________________ > >> > Matplotlib-users mailing list > >> > Mat...@li... > >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > >> > > >> > >> > >> > >> -- > >> Information System Engineer, Ph.D. > >> Blog: http://matt.eifelle.com > >> LinkedIn: http://www.linkedin.com/in/matthieubrucher > >> > >> > > > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of $1 Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh > > > |
|
From: Tim G. <tg...@pr...> - 2010-07-26 17:11:44
|
On Jul 26, 2010 at 02:01 PM -0300, Waléria Antunes David wrote: > i don't understand.. Just divide through by '1000.' or '1000.0' (same thing). If you write 3100/1000, you'll get '3' because you are doing integer math. If you write 3100/1000.0, you'll get '3.1' because you are doing float math. |
|
From: Angus M. <am...@gm...> - 2010-07-26 17:08:31
|
On 26 July 2010 13:01, Waléria Antunes David <wal...@gm...> wrote: > i don't understand.. python (version < 3, I think) uses integer division when given integer values, i.e. 1/1000 = 0, at the expense of giving a less accurate answer than we might expect. If you tried to plot a bunch of values divided by 1000, they may well all be integer 0, and so you wouldn't see any line (it would be at the x-axis). You would need to force python to do floating point division: 1/1000.0 = 0.001; to do this you need to make sure one of the numbers in the division is floating point: the simplest way to do this is 1/1000.0 (or 1/1000. for short). I hope that helps, Angus. > On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...> wrote: >> >> On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...> >> wrote: >> > My code like this in django: http://pastebin.com/nzM5jvuc >> >> Are you perhaps suffering from integer division? How about dividing by >> 1000.0, instead of 1000? >> >> Angus. >> >> > i'm lost >> > >> > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: >> >> >> >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid >> >> any >> >> integer nonsense and make sure to reset your axis limits. >> >> >> >> >> >> >> >> Posting a small code snippet would help us get you on the right track. >> >> >> >> -p >> >> >> >> >> >> >> >> From: Waléria Antunes David [mailto:wal...@gm...] >> >> Sent: Monday, July 26, 2010 9:32 AM >> >> To: Matthieu Brucher >> >> Cc: mat...@li... >> >> Subject: Re: [Matplotlib-users] Hz to KHz >> >> >> >> >> >> >> >> I know...I tried but I'm using django and also when divided by 1000 the >> >> image does not appear... >> >> I don't know what to do.....help me.... >> >> >> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher >> >> <mat...@gm...> wrote: >> >> >> >> Hi, >> >> >> >> You may just divide them by 1000? >> >> >> >> Matthieu >> >> >> >> 2010/7/26 Waléria Antunes David <wal...@gm...>: >> >> >> >> > Hello all, >> >> > >> >> > I need to format the values of graphic to KHz.....my values are in Hz >> >> > see at idle python it displays the values as: 3000 3050 3100 .... >> >> > 3400 , >> >> > but >> >> > I need to go where it will be displayed KHz: 3.0 3.1 >> >> > >> >> > can someone help me? >> >> >> >> > >> >> > >> >> > ------------------------------------------------------------------------------ >> >> > The Palm PDK Hot Apps Program offers developers who use the >> >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> >> > of $1 Million in cash or HP Products. Visit us here for more details: >> >> > http://ad.doubleclick.net/clk;226879339;13503038;l? >> >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> >> > _______________________________________________ >> >> > Matplotlib-users mailing list >> >> > Mat...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > >> >> > >> >> >> >> >> >> >> >> -- >> >> Information System Engineer, Ph.D. >> >> Blog: http://matt.eifelle.com >> >> LinkedIn: http://www.linkedin.com/in/matthieubrucher >> >> >> >> >> > >> > >> > ------------------------------------------------------------------------------ >> > The Palm PDK Hot Apps Program offers developers who use the >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> > of $1 Million in cash or HP Products. Visit us here for more details: >> > http://ad.doubleclick.net/clk;226879339;13503038;l? >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> > >> >> >> >> -- >> AJC McMorland >> Post-doctoral research fellow >> Neurobiology, University of Pittsburgh > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |
|
From: bbarton <bas...@gm...> - 2010-07-26 17:06:38
|
Hi Everyone, I am working on a weather conditions plot containing wind speed and direction. For that I use a custom polar projection. Now updated from Matplotlib 0.99 to 1.0 to use the subplot2grid feature. Now, after trying and searching for hours, I seem to be too dumb to combine my custom projection and subplot2grid. Before it did this way: ax1=plt.figure().add_subplot(111, projection='northpolar') But now I need sth like: ax2 = plt.subplot2grid((5,5), (2,3), colspan=2, rowspan=3) subplot2grid doesn't like a projection keyword. How can I implement my projection? Thanks! BB -- View this message in context: http://old.nabble.com/matplotlib-subplot2grid-and-projection-tp29268717p29268717.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: <PH...@Ge...> - 2010-07-26 17:06:32
|
Replace this line: ax.plot(f/1000, Sserie) With this line: ax.plot(f/1000.0, Sserie) And tell us how things go. Python 2.6 distinguishes between integers and floats very strictly. Hence: In [1]: 20/1000 Out[1]: 0 In [2]: 20.0/1000.0 Out[2]: 0.02 See the difference? -paul From: Waléria Antunes David [mailto:wal...@gm...] Sent: Monday, July 26, 2010 10:01 AM To: Angus McMorland Cc: mat...@li... Subject: Re: [Matplotlib-users] Hz to KHz i don't understand.. On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...<mailto:am...@gm...>> wrote: On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...<mailto:wal...@gm...>> wrote: > My code like this in django: http://pastebin.com/nzM5jvuc Are you perhaps suffering from integer division? How about dividing by 1000.0, instead of 1000? Angus. > i'm lost > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...<mailto:PH...@ge...>> wrote: >> >> Make sure that you're dividing by 1000.0 (as opposed to 1000) to avoid any >> integer nonsense and make sure to reset your axis limits. >> >> >> >> Posting a small code snippet would help us get you on the right track. >> >> -p >> >> >> >> From: Waléria Antunes David [mailto:wal...@gm...<mailto:wal...@gm...>] >> Sent: Monday, July 26, 2010 9:32 AM >> To: Matthieu Brucher >> Cc: mat...@li...<mailto:mat...@li...> >> Subject: Re: [Matplotlib-users] Hz to KHz >> >> >> >> I know...I tried but I'm using django and also when divided by 1000 the >> image does not appear... >> I don't know what to do.....help me.... >> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher >> <mat...@gm...<mailto:mat...@gm...>> wrote: >> >> Hi, >> >> You may just divide them by 1000? >> >> Matthieu >> >> 2010/7/26 Waléria Antunes David <wal...@gm...<mailto:wal...@gm...>>: >> >> > Hello all, >> > >> > I need to format the values of graphic to KHz.....my values are in Hz >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , >> > but >> > I need to go where it will be displayed KHz: 3.0 3.1 >> > >> > can someone help me? >> >> > >> > ------------------------------------------------------------------------------ >> > The Palm PDK Hot Apps Program offers developers who use the >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> > of $1 Million in cash or HP Products. Visit us here for more details: >> > http://ad.doubleclick.net/clk;226879339;13503038;l? >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li...<mailto:Mat...@li...> >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> > >> >> >> >> -- >> Information System Engineer, Ph.D. >> Blog: http://matt.eifelle.com >> LinkedIn: http://www.linkedin.com/in/matthieubrucher >> >> > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li...<mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |
|
From: Waléria A. D. <wal...@gm...> - 2010-07-26 17:01:12
|
i don't understand.. On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...> wrote: > On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...> > wrote: > > My code like this in django: http://pastebin.com/nzM5jvuc > > Are you perhaps suffering from integer division? How about dividing by > 1000.0, instead of 1000? > > Angus. > > > i'm lost > > > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: > >> > >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid > any > >> integer nonsense and make sure to reset your axis limits. > >> > >> > >> > >> Posting a small code snippet would help us get you on the right track. > >> > >> -p > >> > >> > >> > >> From: Waléria Antunes David [mailto:wal...@gm...] > >> Sent: Monday, July 26, 2010 9:32 AM > >> To: Matthieu Brucher > >> Cc: mat...@li... > >> Subject: Re: [Matplotlib-users] Hz to KHz > >> > >> > >> > >> I know...I tried but I'm using django and also when divided by 1000 the > >> image does not appear... > >> I don't know what to do.....help me.... > >> > >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher > >> <mat...@gm...> wrote: > >> > >> Hi, > >> > >> You may just divide them by 1000? > >> > >> Matthieu > >> > >> 2010/7/26 Waléria Antunes David <wal...@gm...>: > >> > >> > Hello all, > >> > > >> > I need to format the values of graphic to KHz.....my values are in Hz > >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 > , > >> > but > >> > I need to go where it will be displayed KHz: 3.0 3.1 > >> > > >> > can someone help me? > >> > >> > > >> > > ------------------------------------------------------------------------------ > >> > The Palm PDK Hot Apps Program offers developers who use the > >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > >> > of $1 Million in cash or HP Products. Visit us here for more details: > >> > http://ad.doubleclick.net/clk;226879339;13503038;l? > >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > >> > _______________________________________________ > >> > Matplotlib-users mailing list > >> > Mat...@li... > >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > >> > > >> > >> > >> > >> -- > >> Information System Engineer, Ph.D. > >> Blog: http://matt.eifelle.com > >> LinkedIn: http://www.linkedin.com/in/matthieubrucher > >> > >> > > > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of $1 Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh > |
|
From: Angus M. <am...@gm...> - 2010-07-26 16:57:48
|
On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...> wrote: > My code like this in django: http://pastebin.com/nzM5jvuc Are you perhaps suffering from integer division? How about dividing by 1000.0, instead of 1000? Angus. > i'm lost > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: >> >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid any >> integer nonsense and make sure to reset your axis limits. >> >> >> >> Posting a small code snippet would help us get you on the right track. >> >> -p >> >> >> >> From: Waléria Antunes David [mailto:wal...@gm...] >> Sent: Monday, July 26, 2010 9:32 AM >> To: Matthieu Brucher >> Cc: mat...@li... >> Subject: Re: [Matplotlib-users] Hz to KHz >> >> >> >> I know...I tried but I'm using django and also when divided by 1000 the >> image does not appear... >> I don't know what to do.....help me.... >> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher >> <mat...@gm...> wrote: >> >> Hi, >> >> You may just divide them by 1000? >> >> Matthieu >> >> 2010/7/26 Waléria Antunes David <wal...@gm...>: >> >> > Hello all, >> > >> > I need to format the values of graphic to KHz.....my values are in Hz >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , >> > but >> > I need to go where it will be displayed KHz: 3.0 3.1 >> > >> > can someone help me? >> >> > >> > ------------------------------------------------------------------------------ >> > The Palm PDK Hot Apps Program offers developers who use the >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> > of $1 Million in cash or HP Products. Visit us here for more details: >> > http://ad.doubleclick.net/clk;226879339;13503038;l? >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> > >> >> >> >> -- >> Information System Engineer, Ph.D. >> Blog: http://matt.eifelle.com >> LinkedIn: http://www.linkedin.com/in/matthieubrucher >> >> > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |
|
From: Waléria A. D. <wal...@gm...> - 2010-07-26 16:47:46
|
My code like this in django: http://pastebin.com/nzM5jvuc i'm lost On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: > Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid > any integer nonsense and make sure to reset your axis limits. > > > > Posting a small code snippet would help us get you on the right track. > > -p > > > > *From:* Waléria Antunes David [mailto:wal...@gm...] > *Sent:* Monday, July 26, 2010 9:32 AM > *To:* Matthieu Brucher > *Cc:* mat...@li... > *Subject:* Re: [Matplotlib-users] Hz to KHz > > > > I know...I tried but I'm using django and also when divided by 1000 the > image does not appear... > I don't know what to do.....help me.... > > On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher < > mat...@gm...> wrote: > > Hi, > > You may just divide them by 1000? > > Matthieu > > 2010/7/26 Waléria Antunes David <wal...@gm...>: > > > Hello all, > > > > I need to format the values of graphic to KHz.....my values are in Hz > > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , > but > > I need to go where it will be displayed KHz: 3.0 3.1 > > > > can someone help me? > > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of $1 Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > Information System Engineer, Ph.D. > Blog: http://matt.eifelle.com > LinkedIn: http://www.linkedin.com/in/matthieubrucher > > > |
|
From: Joe K. <jki...@wi...> - 2010-07-26 16:42:01
|
It sounds like you're wanting a gaussian kernel density estimate (KDE) (not the desktop!). The other options you mentioned are for interpolation, and are not at all what you're wanting to do. You can use scipy.stats.kde.gaussian_kde()<http://www.scipy.org/doc/api_docs/SciPy.stats.kde.gaussian_kde.html>. However, it currently doesn't take a weights array, so you'll need to modify it for your use case. If you prefer, I have faster version of a gaussian KDE that can take a weights array. It's actually slower than the scipy's gaussian kde for a low number of points, but for hundreds, thousands, or millions of points, it's several orders of magnitude faster. (Though the speedup depends on the covariance of the points... higher covariance = slower, generally speaking) Here's a quick pastebin of the code. http://pastebin.com/LNdYCZgw To use it, you do something like the below... (assuming the code in the pastebin is saved in a file called fast_kde.py) import numpy as np import matplotlib.pyplot as plt from fast_kde import fast_kde # From your description of your data... weights, x, y = np.loadtxt('chain.txt', usecols=(0,4,6)).T kde_grid = fast_kde(x, y, gridsize=(200,200), weights=weights) # Plot the grid plt.figure() plt.imshow(kde_grid, extent=(x.min(), x.max(), y.max(), y.min()) # Reverse the y-axis plt.gca().invert_yaxis() plt.show() Hope that helps a bit, -Joe On Sat, Jul 24, 2010 at 3:56 AM, montefra <fra...@go...>wrote: > > Hi, > > I am writing a program that reads three columns (one column containing the > weights, the other two containing the values I want to plot) from a file > containing the results from a MonteCarlo Markov Chain. The file contains > thousends of lines. Then create the 2D histogram and make contourplots. > Here > is a sample of the code (I don't know if is correct, it's just to show what > I do) > > >>> import numpy as np > >>> import matplotlib.pyplot as mplp > >>> chain = np.loadtxt("chain.txt", usecols=[0,4,6]) #read columns 0 (the > >>> weights), 4 and 6 (the data), from the file "chain.txt" > >>> h2D, xe, ye = np.histogram2D(chain[:,1],chain[:,2], weights=chain[:,0]) > >>> #create the 2D histogram > >>> x = (xe[:-1] + xe[1:])/2. #x and y values for the plot (I use the mean > >>> of each bin) > >>> y = (ye[:-1] + ye[1:])/2. > >>> mplp.figure() #open the figure > >>> mplp.contourf(x, y, h2D.T, origin='lower') #contour plot > > As it is the contours are not smooth and they look not that nice. After > days > of searches I've found three methods and tried, unsuccesfully, to apply > them > 1) 2d interpolation: I got "segmentation fault" (on a quadcore machine with > 8Gb of RAM) > 2) Rbf (radial basis functions): I got wrong contours > 3) ndimage: it creates spurious features (like secondary peaks parallel to > the direction of the main one) > > Before beginning with Python, I used to use IDL to plot, and there is a > function 'smooth' that smooth for you 2D histograms. I haven't found > anything similar for Python. > Does anyone have an idea or suggestion on how to do it? > > Thank in advance > Francesco > > -- > View this message in context: > http://old.nabble.com/Smooth-contourplots-tp29253884p29253884.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Waléria A. D. <wal...@gm...> - 2010-07-26 16:32:08
|
I know...I tried but I'm using django and also when divided by 1000 the image does not appear... I don't know what to do.....help me.... On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher < mat...@gm...> wrote: > Hi, > > You may just divide them by 1000? > > Matthieu > > 2010/7/26 Waléria Antunes David <wal...@gm...>: > > Hello all, > > > > I need to format the values of graphic to KHz.....my values are in Hz > > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , > but > > I need to go where it will be displayed KHz: 3.0 3.1 > > > > can someone help me? > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of $1 Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > Information System Engineer, Ph.D. > Blog: http://matt.eifelle.com > LinkedIn: http://www.linkedin.com/in/matthieubrucher > |