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
(3) |
2
(1) |
3
(3) |
4
(8) |
5
(5) |
|
6
(1) |
7
(16) |
8
(7) |
9
(29) |
10
(16) |
11
(8) |
12
(8) |
|
13
(1) |
14
(17) |
15
(15) |
16
(23) |
17
(20) |
18
(25) |
19
(2) |
|
20
(3) |
21
(12) |
22
(6) |
23
(11) |
24
(6) |
25
(3) |
26
|
|
27
(2) |
28
(4) |
29
(19) |
30
(5) |
31
(33) |
|
|
|
From: Henry P. <hen...@en...> - 2008-01-14 08:46:22
|
On Thu, 2008-01-10 at 14:10 +0100, Henry Proudhon wrote:
> Hi Matplotlib users,
>
> I'm experiencing some problems when closing a figure (I'm using
> matplotlib 0.91.0).
> the function is working correctly when invoked inside the module where
> it is defined:
>
> from pylab import *
>
> def test():
> t = arange(0.0, 1.0+0.01, 0.01)
> s = cos(2*2*pi*t)
> plot(t, s, '-', lw=2)
> show()
> print 'after show'
>
> if __name__ == '__main__':
> print test()
>
> now if I call test() from another module, the figure closes but show()
> does not return ('after show' does not get printed) so the execution is
> stuck.
>
> Can somebody shed some light here, I'm really missing something...
>
> Thanks a lot
> Henry
In case somebody has the same problem, I worked around this by embedding
a matplotlib figure in a gtk window but it's a lot heavier.
Henry
|
|
From: Tom J. <tj...@gm...> - 2008-01-14 07:27:30
|
I was looking at rc_params() and saw
if not os.path.exists(fname):
message = 'could not find rc file; returning defaults'
ret = dict([ (key, tup[0]) for key, tup in defaultParams.items()])
warnings.warn(message)
return ret
Is this correct? It seems that it returns a regular dictionary rather
than an instance of RcParams.
~tj
|
|
From: Christopher F. <fon...@ma...> - 2008-01-14 01:26:39
|
On some OSX systems, pylab is failing on importing pylab because of
lack of GTK. This appears to be a bug; if the system doesnt have gtk,
it should simply not import that backend to begin with.
>>> from matplotlib import pylab
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-
macosx-10.5-i386.egg/matplotlib/pylab.py", line 292, in <module>
from matplotlib.pyplot import *
File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-
macosx-10.5-i386.egg/matplotlib/pyplot.py", line 39, in <module>
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-
macosx-10.5-i386.egg/matplotlib/backends/__init__.py", line 24, in
pylab_setup
globals(),locals(),[backend_name])
File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-
macosx-10.5-i386.egg/matplotlib/backends/backend_gtkagg.py", line 10,
in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
FigureCanvasGTK,\
File "/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-
macosx-10.5-i386.egg/matplotlib/backends/backend_gtk.py", line 6, in
<module>
import gobject
ImportError: No module named gobject
>>>
|
|
From: Christopher F. <lis...@ma...> - 2008-01-14 00:02:37
|
OK, I managed to build with the setupext.py list empty as you specified. However, for some reason, the resulting matplotlib egg *still* looks for dynamic libraries in /usr/local: ImportError: dlopen(/Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so Reason: image not found This is pretty bizarre. On 12/01/2008, at 12:42 PM, Charlie Moad wrote: > I just had to rebuild the OSX binary because a similar reason. I > forgot to change the basedir['darwin'] entry in setupext.py. Around > line 50..... > > Change: > 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/ > local', > '/usr', '/sw', '/usr/X11R6'], > To: > 'darwin' : [], > > This will ensure you don't pick up shared libraries over the static > ones since they are preferred by gcc. |
|
From: Michael F. <wet...@ya...> - 2008-01-13 22:04:15
|
I want to create an copy of a subplot in its unique figure after being clicked on in a figure with multiple subplots. My code seems to work but I believe is inefficient and I'd like to understand how to use the event.* information more effectively in mpl.
I am successfully creating multiple subplots in a Figure using a class with lines for the data such as below. I create a new figure for each instance of the class with 8 subplots in each.
exec("self.a.plot(glbl.%s0_pcdata,glbl.%s6_pcdata,glbl.%s0_pcdata,glbl.%s9_pcdata)"%(color,color,color,color))
Furthermore I am using a mpl_connect to successfully capture and then validate which instance of the Figure for each of the unique subplots clicked on.
self.cid=self.canvas.mpl_connect('button_press_event', click)
I want to use the event to make an alternate sized plot of the subplot chosen. I can do this through some modest logic where I use the event information identify the instance clicked on. A partial description of this logic is below - which seems to work properly. (a, b, c ... are subplots; Instances are Kfigure, Yfigure etc...)
def click(event):
print 'you clicked x,y', event.x, event.y
print 'you clicked inaxes', event.inaxes
print 'string name of event', event.name
print 'figure canvas instance', event.canvas
if event.canvas==Kfigure.canvas:
print "K canvas clicked"
if event.canvas==Yfigure.canvas:
print "Y canvas clicked"
if event.inaxes==Kfigure.a:
print "clicked inside subplot a of figure K"
However, to create an alternate "new" plot of the subplot I clicked, I have to create extended logic code (as above) for each of 40 subplots on 5 figures, and then reidentify the source data similar to the original exec line and shown below. This seems inefficient. Isn't there a more straightforward way to create the subplot clicked in its instances of "new" figure // sorry if my terminology is inexact.. noob // A section of my suspected inefficient code is below.
Isn't there a way to use the event.inaxes, or other axes or data information to identify the data to be plotted and then subplot it? Ideally this should include legend information that was created with the instance as well - that is not explicitly shown but I have done. All I am really trying to do is enlarge one of the subplots for the user. In the example in this email, I simply want to have a large Kfigure.a created.
I can get my code to work but it seems overly long and inefficient.
if event.inaxes==Kfigure.a:
print "clicked inside subplot a of figure K"
color="K"
bigroot=Tk.Tk()
bigroot.wm_title("title with big wm_title")
bigf=Figure(figsize=(3,6), dpi=72)
biga=bigf.add_subplot(111)
exec("biga.plot(glbl.%s0_pcdata,glbl.%s6_pcdata)"%(color,color))
bigcanvas=FigureCanvasTkAgg(bigf, master=bigroot)
bigcanvas.show()
bigcanvas.get_tk_widget().pack(side=Tk.TOP,fill=Tk.BOTH,expand=1)
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping |
|
From: Georg H. <gr...@mu...> - 2008-01-12 21:21:02
|
Hallo! Thanks for your answer ! > One way would be to use the NonUniformImage class in image.py instead of > the Image class that is being used by the imshow() call in > Axes.specgram. Hm ... I looked into image.py but I don't know how this is used by specgram (sorry, I am a newbie - and did not find more about specgram in the matplotlib source (where is the specgram source?)). Could you maybe give some more hints how I would have to do this ? (or are there maybe examples in which I can look?) Or did nobody else use a logarithmic spectrogram before ? Thanks, LG Georg |
|
From: Christiaan P. <cep...@go...> - 2008-01-12 18:23:48
|
Hi Michael, Sorry for getting back to you only now, and thanks for the help. If you have Qt installed there should be an sample Svg viewer app in the examples somewhere. If you'd like I can send it to you somehow, just let me know. I tested the new .svg you sent me it's rendering the same in Firefox and Qt. So it works. Once again thanks for your help and let me know if I can send you something to help with testing in Qt. Personally I think Qt's support for svg is still a bit iffy. Have a nice, Christiaan On 04/01/2008, Michael Droettboom <md...@st...> wrote: > > Can you please test the attached SVG file? > > Cheers, > Mike > > Michael Droettboom wrote: > > Between 0.90 and 0.91, the SVG backend was changed to store the glyph > > outlines of the characters in the SVG file itself. (This is on by > > default, but can be turned off with the rc parameter > > svg.embed_char_paths). This helps make the SVG files much more > > portable, as the need to install the math fonts has long been a FAQ on > > this list. I've been doing all my testing with Firefox and Inkscape. > > Is there a simple Qt-based SVG viewer I could add to my testing regimen? > > > > I won't pretend to be an expert on the SVG spec, but it does say this: > > > > <http://www.w3.org/TR/SVG/struct.html#Head> > > > > ==== > > > > To provide some SVG user agents with an opportunity to implement > > efficient implementations in streaming environments, creators of SVG > > content are encouraged to place all elements which are targets of local > > URI references within a 'defs' element which is a direct child of one of > > the ancestors of the referencing element. For example: > > > > <?xml version="1.0" standalone="no"?> > > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" > > "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> > > <svg width="8cm" height="3cm" > > xmlns="http://www.w3.org/2000/svg"> > > <desc>Local URI references within ancestor's 'defs' element.</desc> > > <defs> > > <linearGradient id="Gradient01"> > > <stop offset="20%" stop-color="#39F" /> > > <stop offset="90%" stop-color="#F3F" /> > > </linearGradient> > > </defs> > > <rect x="1cm" y="1cm" width="6cm" height="1cm" > > fill="url(#Gradient01)" /> > > <!-- Show outline of canvas using 'rect' element --> > > <rect x=".01cm" y=".01cm" width="7.98cm" height="2.98cm" > > fill="none" stroke="blue" stroke-width=".02cm" /> > > </svg> > > > > View this example as SVG (SVG-enabled browsers only) > > > > In the document above, the linear gradient is defined within a 'defs' > > element which is the direct child of the 'svg' element, which in turn is > > an ancestor of the 'rect' element which references the linear gradient. > > Thus, the above document conforms to the guideline. > > > > ==== > > > > So we are complying to that part of the spec. The spec doesn't seem to > > say anything about whether the defs must appear before or after their > > use -- but maybe I just can't find the relevant paragraph. > > > > In any case, this should be easy enough to fix on matplotlib's end, and > > certainly won't break compliance with the spec. I'll have a look, and > > may come back to you for help with testing with Qt if you don't mind. > > > > Cheers, > > Mike > > > > Christiaan Putter wrote: > >> Hi there, > >> > >> Just an update regarding the svg problem I was having: > >> > >> I simply went back to 0.90 and that's working now. > >> > >> Would still be nice to know if the svg output from matplotlib complies > >> with the standard or whether it's Qt that's messing things up. > >> > >> Merry x-mass! > >> > >> cputter > >> > >> > >> > >> On 21/12/2007, *Christiaan Putter* <cep...@go... > >> <mailto:cep...@go...>> wrote: > >> > >> Hi guys and girls, > >> > >> Quick question regarding matplotlib's svg backend... > >> > >> I've embeded pyhton into c++ and Qt's (4.3.3) svg support is having > >> some problems with .svg files created by matplotlib. Text isn't > >> showing up. Firefox displays the same .svg file correctly > though... > >> > >> The problem: > >> > >> It seems some text stuff is stored in a section called defs at the > >> end of the file with stuff linking to this earlier in the file. Qt > >> doesn't like that and only displays the normal plot stuff (lines, > >> etc.) but not the labels and other text. > >> > >> More exact: > >> > >> <use xlink:href="#c_7" ..... > >> > >> references > >> > >> <path id="c_7" d="M10.6875 ..... > >> > >> at the end of the file. > >> > >> > >> > >> When I simply cut and paste the defs section to the beginning of > the > >> file it solves the problem. > >> > >> What does the svg standard say about this? I assume Qt's > >> implementation is defect... > >> > >> Has anybody else encountered this problem? I'll send an e-mail to > >> Qt too and ask them about it. > >> > >> Hope you're all having a nice day. > >> > >> Regards, > >> cputter > >> > >> > >> > >> > ------------------------------------------------------------------------- > >> This SF.net email is sponsored by: Microsoft > >> Defy all challenges. Microsoft(R) Visual Studio 2005. > >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> <mailto:Mat...@li...> > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> <https://lists.sourceforge.net/lists/listinfo/matplotlib-users> > >> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------- > >> This SF.net email is sponsored by: Microsoft > >> Defy all challenges. Microsoft(R) Visual Studio 2005. > >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > |
|
From: Christopher F. <lis...@ma...> - 2008-01-12 18:12:30
|
Thanks Charlie,
I've done this, but for some reason, its still looking for things in /
usr/local:
In file included from src/ft2font.h:11,
from src/ft2font.cpp:2:
/usr/local/include/ft2build.h:56:38: error: freetype/config/
ftheader.h: No such file or directory
cf
On 12/01/2008, at 12:42 PM, Charlie Moad wrote:
> I just had to rebuild the OSX binary because a similar reason. I
> forgot to change the basedir['darwin'] entry in setupext.py. Around
> line 50.....
>
> Change:
> 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/
> local',
> '/usr', '/sw', '/usr/X11R6'],
> To:
> 'darwin' : [],
>
> This will ensure you don't pick up shared libraries over the static
> ones since they are preferred by gcc.
>
> - Charlie
>
> On Jan 12, 2008 12:04 PM, Chris <lis...@ma...> wrote:
>> I'm trying to build some matplotlib eggs to bundle
>> and distribute with some other python packages. So, I am doing
>> my best to statically link to libraries like libpng, libfreetype,
>> etc.
>> that users may not have installed. I am building using the following:
>>
>> python setupegg.py config -L../staticlibs build bdist_egg
>>
>> where ../staticlibs contains the libraries that I am statically
>> linking. Unfortunately, users are still getting errors such as the
>> following:
>>
>> ImportError: dlopen(/Library/Python/2.5/site-packages/
>> matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so,
>> 2):
>> Library not loaded: /usr/local/lib/libpng12.0.dylib
>> Referenced from: /Library/Python/2.5/site-packages/
>> matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so
>> Reason: image not found
>>
>> Anyone have a clue what I am not doing properly?
>>
>> Thanks,
>> Chris
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
|
|
From: Charlie M. <cw...@gm...> - 2008-01-12 17:42:11
|
I just had to rebuild the OSX binary because a similar reason. I
forgot to change the basedir['darwin'] entry in setupext.py. Around
line 50.....
Change:
'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
'/usr', '/sw', '/usr/X11R6'],
To:
'darwin' : [],
This will ensure you don't pick up shared libraries over the static
ones since they are preferred by gcc.
- Charlie
On Jan 12, 2008 12:04 PM, Chris <lis...@ma...> wrote:
> I'm trying to build some matplotlib eggs to bundle
> and distribute with some other python packages. So, I am doing
> my best to statically link to libraries like libpng, libfreetype, etc.
> that users may not have installed. I am building using the following:
>
> python setupegg.py config -L../staticlibs build bdist_egg
>
> where ../staticlibs contains the libraries that I am statically
> linking. Unfortunately, users are still getting errors such as the following:
>
> ImportError: dlopen(/Library/Python/2.5/site-packages/
> matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2):
> Library not loaded: /usr/local/lib/libpng12.0.dylib
> Referenced from: /Library/Python/2.5/site-packages/
> matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so
> Reason: image not found
>
> Anyone have a clue what I am not doing properly?
>
> Thanks,
> Chris
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Eric F. <ef...@ha...> - 2008-01-12 17:29:36
|
Georg Holzmann wrote: > Hallo! > > (Sorry if this is maybe a basic question, but I did not find something > in the archives or in the net) > > I am trying to make a spectrogram of audio data with the function > "specgram", where the frequency axis is logarithmic (as it is used > usually in audio/speech processing). > However, "specgram" uses a linear frequency axis by default and I was > not able to change this behaviour ... > > So my question: is it possible to get a logarithmic frequency axis with > specgram or any other function ? One way would be to use the NonUniformImage class in image.py instead of the Image class that is being used by the imshow() call in Axes.specgram. See examples/pcolor_nonuniform.py for an example of how to use the NonUniformImage class. Eric > > Many thanks for any hints, > LG > Georg |
|
From: Chris <lis...@ma...> - 2008-01-12 17:04:52
|
I'm trying to build some matplotlib eggs to bundle and distribute with some other python packages. So, I am doing my best to statically link to libraries like libpng, libfreetype, etc. that users may not have installed. I am building using the following: python setupegg.py config -L../staticlibs build bdist_egg where ../staticlibs contains the libraries that I am statically linking. Unfortunately, users are still getting errors such as the following: ImportError: dlopen(/Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so Reason: image not found Anyone have a clue what I am not doing properly? Thanks, Chris |
|
From: Georg H. <gr...@mu...> - 2008-01-12 16:30:08
|
Hallo! (Sorry if this is maybe a basic question, but I did not find something in the archives or in the net) I am trying to make a spectrogram of audio data with the function "specgram", where the frequency axis is logarithmic (as it is used usually in audio/speech processing). However, "specgram" uses a linear frequency axis by default and I was not able to change this behaviour ... So my question: is it possible to get a logarithmic frequency axis with specgram or any other function ? Many thanks for any hints, LG Georg |
|
From: Michele V. <Mic...@jp...> - 2008-01-12 00:39:08
|
It works! Thanks for such quick turnaround!
If I may add a suggestion for the matplotlib setup from sources
(which I had tried just after the egg install failed):
The directory specified to the --prefix argument of setup.py would
seem like a natural addition to basedir in setupext.py (of course
it's always possible, but more awkward to edit it). The scenario
(which matches mine) is a user of a computing cluster who has no
administrator access, and is installing all libraries in $HOME/lib
and $HOME/include.
The prefix can be extracted from the line arguments with
installation_prefix = None
for arg in sys.argv:
if arg.startswith('--prefix='):
installation_prefix = arg.split('=', 1)[1]
if installation_prefix:
basedir.append(installation_prefix)
I'm sure there is another method to do this that fits more naturally
with distutils. There's a reference to --prefix later in setupext.py,
but I don't think it's operational.
Thanks again,
Michele
On Jan 11, 2008, at 12:58 PM, Charlie Moad wrote:
> I have replaced the binary with a working version.
>
> Thanks again for the catch,
> Charlie
>
> On Jan 11, 2008 2:15 PM, Charlie Moad <cw...@gm...> wrote:
>> Apparently a dynamic link snuck into the build. Typically everything
>> is statically included. You can see this by running the following
>> command:
>>
>> uaternion:matplotlib cmoad$ otool -L ft2font.so
>> ft2font.so:
>> /usr/local/lib/libfreetype.6.dylib (compatibility version
>> 10.0.0,
>> current version 10.16.0)
>> /usr/lib/libz.1.dylib (compatibility version 1.0.0,
>> current version 1.2.3)
>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
>> current version 7.4.0)
>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
>> current
>> version 88.3.6)
>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
>> current version 1.0.0)
>>
>> I will created and post a new build asap.
>>
>> Thanks,
>> Charlie
>>
>> On Jan 11, 2008 1:50 PM, Michele Vallisneri
>>
>> <Mic...@jp...> wrote:
>>> Hello all,
>>>
>>> after installing matplotlib 0.91.2 from the sourceforge egg on OS X
>>> 10.4.11 (Python 2.5.1), I get the following error:
>>>
>>>>>> import pylab
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> File "/Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-
>>> py2.5-macosx-10.3-fat.egg/matplotlib/pylab.py", line 208, in
>>> <module>
>>> from matplotlib import mpl # pulls in most modules
>>> File "/Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-
>>> py2.5-macosx-10.3-fat.egg/matplotlib/mpl.py", line 3, in <module>
>>> from matplotlib import axis
>>> File "/Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-
>>> py2.5-macosx-10.3-fat.egg/matplotlib/axis.py", line 20, in <module>
>>> from font_manager import FontProperties
>>> File "/Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-
>>> py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 40, in
>>> <module>
>>> from matplotlib import ft2font
>>> ImportError: dlopen(/Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so,
>>> 2): Symbol not found: _FT_Attach_File
>>> Referenced from: /Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
>>> Expected in: dynamic lookup
>>>
>>> It seems there's something wrong with ft2font.so, since CDing to the
>>> egg directory and importing only that extension yields
>>>
>>>>>> import ft2font.so
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> ImportError: dlopen(./ft2font.so, 2): Symbol not found:
>>> _FT_Attach_File
>>> Referenced from: /Users/vallis/lib/python2.5/site-packages/
>>> matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
>>> Expected in: dynamic lookup
>>>
>>> Any ideas?
>>>
>>> Cheers,
>>>
>>> Michele
>>>
>>>
>>> --------------------------------------------------------------------
>>> -----
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/
>>> marketplace
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
|
|
From: Charlie M. <cw...@gm...> - 2008-01-11 20:58:36
|
I have replaced the binary with a working version.
Thanks again for the catch,
Charlie
On Jan 11, 2008 2:15 PM, Charlie Moad <cw...@gm...> wrote:
> Apparently a dynamic link snuck into the build. Typically everything
> is statically included. You can see this by running the following
> command:
>
> uaternion:matplotlib cmoad$ otool -L ft2font.so
> ft2font.so:
> /usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0,
> current version 10.16.0)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 88.3.6)
> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
>
> I will created and post a new build asap.
>
> Thanks,
> Charlie
>
> On Jan 11, 2008 1:50 PM, Michele Vallisneri
>
> <Mic...@jp...> wrote:
> > Hello all,
> >
> > after installing matplotlib 0.91.2 from the sourceforge egg on OS X
> > 10.4.11 (Python 2.5.1), I get the following error:
> >
> > >>> import pylab
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> > py2.5-macosx-10.3-fat.egg/matplotlib/pylab.py", line 208, in <module>
> > from matplotlib import mpl # pulls in most modules
> > File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> > py2.5-macosx-10.3-fat.egg/matplotlib/mpl.py", line 3, in <module>
> > from matplotlib import axis
> > File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> > py2.5-macosx-10.3-fat.egg/matplotlib/axis.py", line 20, in <module>
> > from font_manager import FontProperties
> > File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> > py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 40, in
> > <module>
> > from matplotlib import ft2font
> > ImportError: dlopen(/Users/vallis/lib/python2.5/site-packages/
> > matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so,
> > 2): Symbol not found: _FT_Attach_File
> > Referenced from: /Users/vallis/lib/python2.5/site-packages/
> > matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
> > Expected in: dynamic lookup
> >
> > It seems there's something wrong with ft2font.so, since CDing to the
> > egg directory and importing only that extension yields
> >
> > >>> import ft2font.so
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > ImportError: dlopen(./ft2font.so, 2): Symbol not found: _FT_Attach_File
> > Referenced from: /Users/vallis/lib/python2.5/site-packages/
> > matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
> > Expected in: dynamic lookup
> >
> > Any ideas?
> >
> > Cheers,
> >
> > Michele
> >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
|
|
From: Charlie M. <cw...@gm...> - 2008-01-11 19:15:41
|
Apparently a dynamic link snuck into the build. Typically everything
is statically included. You can see this by running the following
command:
uaternion:matplotlib cmoad$ otool -L ft2font.so
ft2font.so:
/usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0,
current version 10.16.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.6)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
I will created and post a new build asap.
Thanks,
Charlie
On Jan 11, 2008 1:50 PM, Michele Vallisneri
<Mic...@jp...> wrote:
> Hello all,
>
> after installing matplotlib 0.91.2 from the sourceforge egg on OS X
> 10.4.11 (Python 2.5.1), I get the following error:
>
> >>> import pylab
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> py2.5-macosx-10.3-fat.egg/matplotlib/pylab.py", line 208, in <module>
> from matplotlib import mpl # pulls in most modules
> File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> py2.5-macosx-10.3-fat.egg/matplotlib/mpl.py", line 3, in <module>
> from matplotlib import axis
> File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> py2.5-macosx-10.3-fat.egg/matplotlib/axis.py", line 20, in <module>
> from font_manager import FontProperties
> File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
> py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 40, in
> <module>
> from matplotlib import ft2font
> ImportError: dlopen(/Users/vallis/lib/python2.5/site-packages/
> matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so,
> 2): Symbol not found: _FT_Attach_File
> Referenced from: /Users/vallis/lib/python2.5/site-packages/
> matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
> Expected in: dynamic lookup
>
> It seems there's something wrong with ft2font.so, since CDing to the
> egg directory and importing only that extension yields
>
> >>> import ft2font.so
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: dlopen(./ft2font.so, 2): Symbol not found: _FT_Attach_File
> Referenced from: /Users/vallis/lib/python2.5/site-packages/
> matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
> Expected in: dynamic lookup
>
> Any ideas?
>
> Cheers,
>
> Michele
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Michele V. <Mic...@jp...> - 2008-01-11 18:50:39
|
Hello all,
after installing matplotlib 0.91.2 from the sourceforge egg on OS X
10.4.11 (Python 2.5.1), I get the following error:
>>> import pylab
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
py2.5-macosx-10.3-fat.egg/matplotlib/pylab.py", line 208, in <module>
from matplotlib import mpl # pulls in most modules
File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
py2.5-macosx-10.3-fat.egg/matplotlib/mpl.py", line 3, in <module>
from matplotlib import axis
File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
py2.5-macosx-10.3-fat.egg/matplotlib/axis.py", line 20, in <module>
from font_manager import FontProperties
File "/Users/vallis/lib/python2.5/site-packages/matplotlib-0.91.2-
py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 40, in
<module>
from matplotlib import ft2font
ImportError: dlopen(/Users/vallis/lib/python2.5/site-packages/
matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so,
2): Symbol not found: _FT_Attach_File
Referenced from: /Users/vallis/lib/python2.5/site-packages/
matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
Expected in: dynamic lookup
It seems there's something wrong with ft2font.so, since CDing to the
egg directory and importing only that extension yields
>>> import ft2font.so
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(./ft2font.so, 2): Symbol not found: _FT_Attach_File
Referenced from: /Users/vallis/lib/python2.5/site-packages/
matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg/matplotlib/ft2font.so
Expected in: dynamic lookup
Any ideas?
Cheers,
Michele
|
|
From: Matthias M. <Mat...@gm...> - 2008-01-11 13:04:03
|
Hi Thorsten,
On Wednesday 09 January 2008 15:35, Thorsten Kranz wrote:
> Hi list, Hi Matthias,
>
> I found another way to deal with this problem. when defining the colorbar,
> one can give an additional kwarg "format", so by defining the kwarg
> "format=formatter", we solved the problem.
I'm happy that your problem disappeared, but I still have a question. On my
system the problem still exist, if I use "format=formatter" in colorbar and
after that use
cb.ax.yaxis.set_major_formatter(formatter)
in the example-code of my last email.
Can anybody confirm this behaviour (data range 0.0 ... 0.54 -> 0.0 ... 0.95)?
And if so: Is this the expected behaviour?
best regards,
Matthias
> Anyway, I think an option as Matthias implemented would be very handy for
> all those users like us here in Germany who might want to have the numbers
> formatted with commata.
>
> Greetings,
> Thorsten
>
> 2008/1/9, Matthias Michler <Mat...@gm...>:
> > Hello list,
> > Hello Thorsten,
> >
> > On Wednesday 09 January 2008 11:38, Thorsten Kranz wrote:
> > > I have a question concerning reformatting of axis-ticks via the
> > > FuncFormatter-class. In german, it's common to use a comma as separator
> >
> > for
> >
> > > decimal numbers instead of a dot. To realize it in matplotlib, I do
> > > something like
> > >
> > > >from matplotlib.ticker import FuncFormatter
> > >
> > > import pylab
> > > pylab.figure()
> > > formatter = FuncFormatter(lambda x,pos: ("%.2f"%x).replace(".",","))
> > > ax = pylab.axes()
> > > ax.xaxis.set_major_formatter(formatter)
> > > ax.yaxis.set_major_formatter(formatter)
> > > ax.plot(pylab.arange(0,1,0.1),pylab.arange(0,1,0.1))
> > > This works fine for me,
> >
> > I had the same idea ;-). The problem is that you have a fixed number of
> > digits
> > behind the comma, which is not the desirable behaviour during zoom.
> > I changed the ticker.py/ axes.py files to circumwait this disadvantage. I
> > attached a patch showing my changes and maybe somebody can test it.
> > You can activate it using:
> > ax.ticklabel_format(style='comma')
> > for an ScalarFormatter
> >
> > > but I encounter a problem when I do an
> > > imshow-command with a colorbar. In the imshow-axes, it's o.k., but for
> >
> > the
> >
> > > colorbar it doesn't really work. I do
> > >
> > > cb = pylab.colorbar()
> > > cb.ax.yaxis.set_major_formatter(formatter)
> > >
> > > and, actually, all dots are replaced by com9mata, but the values are
> >
> > also
> >
> > > changed! E.g. instead of the old values (without formatter) from
> > > 0-0.54, the
> > >
> > > values are increased to 0-0.95.
> >
> > [...]
> >
> > > Can anyone explain why it doesn't work out as I expect it to work?
> >
> > I don't know were the problem comes from. I attached your example in a
> > slitly
> > modified version and this shows that the problem is not due to your
> > special
> > formatting. It occurs with matplotlib.ticker.ScalarFormatter, too.
> >
> > best regards,
> > Matthias
> >
> > > Or is there a better, more standard way to substitute the dots by
> >
> > commata?
> >
> > > Thanks,
> > > Thorsten
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> >
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketpl
> >ace _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Matthias M. <Mat...@gm...> - 2008-01-11 12:50:49
|
Hello Mike,
Hello list,
On Wednesday 09 January 2008 18:21, Michael Droettboom wrote:
> Thanks for the patch. However, perhaps a more general solution would be
> to use the Python locale module to format numbers according to different
> locales.
I agree with you, but it seems to be hard to do.
I'm not familiar with the Python locale module and don't know how much effort
would be needed to fully internationalize the formatting.
> And expose a kwarg select between the user's preferred locale,
> the current U.S. English-centric defaults as they are now, or an
> arbitrary locale using an ISO language code. That seems like it could
> be a better long-term solution, since there are different number formats
> all over, not just in Germany.
You're again right. These three possible formaters should be possible, because
the default-locale is not always the corresponding country and for scientific
publications English is needed.
My hope while sending the patch was that it could be useful to more than
German people and I didn't know about the whole problem of different
seperators.
A problem with the Python locale module might be the difference between plain
and tex-text, because for the comma as decimal seperator '{,}' is used in
tex-text and I'm not sure if the locale module take care of that.
best regards,
Matthias
> All that said, internationalization is hard -- especially for us
> sheltered people in the U.S. where the defaults are most often correct.
> I may be missing an important detail here.
>
> Cheers,
> Mike
>
> Thorsten Kranz wrote:
> > Hi list, Hi Matthias,
> >
> > I found another way to deal with this problem. when defining the
> > colorbar, one can give an additional kwarg "format", so by defining the
> > kwarg "format=formatter", we solved the problem.
> >
> > Anyway, I think an option as Matthias implemented would be very handy
> > for all those users like us here in Germany who might want to have the
> > numbers formatted with commata.
> >
> > Greetings,
> > Thorsten
> >
> > 2008/1/9, Matthias Michler <Mat...@gm...
> > <mailto:Mat...@gm...>>:
> >
> > Hello list,
> > Hello Thorsten,
> >
> > On Wednesday 09 January 2008 11:38, Thorsten Kranz wrote:
> > > I have a question concerning reformatting of axis-ticks via the
> > > FuncFormatter-class. In german, it's common to use a comma as
> >
> > separator for
> >
> > > decimal numbers instead of a dot. To realize it in matplotlib, I
> > > do something like
> > >
> > > >from matplotlib.ticker import FuncFormatter
> > >
> > > import pylab
> > > pylab.figure()
> > > formatter = FuncFormatter(lambda x,pos:
> > > ("%.2f"%x).replace(".",",")) ax = pylab.axes()
> > > ax.xaxis.set_major_formatter(formatter)
> > > ax.yaxis.set_major_formatter(formatter)
> > > ax.plot(pylab.arange(0,1,0.1),pylab.arange(0,1,0.1))
> > > This works fine for me,
> >
> > I had the same idea ;-). The problem is that you have a fixed number
> > of digits
> > behind the comma, which is not the desirable behaviour during zoom.
> > I changed the ticker.py/ axes.py files to circumwait this
> > disadvantage. I
> > attached a patch showing my changes and maybe somebody can test it.
> > You can activate it using:
> > ax.ticklabel_format(style='comma')
> > for an ScalarFormatter
> >
> > > but I encounter a problem when I do an
> > > imshow-command with a colorbar. In the imshow-axes, it's o.k.,
> >
> > but for the
> >
> > > colorbar it doesn't really work. I do
> > >
> > > cb = pylab.colorbar()
> > > cb.ax.yaxis.set_major_formatter(formatter)
> > >
> > > and, actually, all dots are replaced by com9mata, but the values
> >
> > are also
> >
> > > changed! E.g. instead of the old values (without formatter) from
> >
> > 0-0.54,
> >
> > > the
> > >
> > > values are increased to 0-0.95.
> >
> > [...]
> >
> > > Can anyone explain why it doesn't work out as I expect it to work?
> >
> > I don't know were the problem comes from. I attached your example in
> > a slitly
> > modified version and this shows that the problem is not due to your
> > special
> > formatting. It occurs with matplotlib.ticker.ScalarFormatter, too.
> >
> > best regards,
> > Matthias
> >
> > > Or is there a better, more standard way to substitute the dots by
> >
> > commata?
> >
> > > Thanks,
> > > Thorsten
> >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> >
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketpl
> >ace _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > <mailto:Mat...@li...>
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketpl
> >ace
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Erik C. <er...@ce...> - 2008-01-11 09:10:12
|
Replying to myself... Erik Cederstrand wrote: > Hi! > > I'm trying to make a clickable plot_date() plot (using the Pylons > framework). What I need is the pixel coordinates of the data points I > give to plot_date(), but the trans.seq_x_y() function doesn't like > Datetime: > > >> xcoords, ycoords = trans.seq_x_y(x, y) > float() argument must be a string or a number > > How can I get the pixel coordinates? > > Here are the relevant parts of my code (x is Datetime, y is float): > > figure = pylab.figure(figsize=(6,4), dpi=100, frameon=False) > ax = figure.add_subplot(111) > > # quick simple scatter plot > ax.plot_date(x, y, 'ro') > > # Convert the data set points into screen space coordinates > trans = ax.get_transform() > xcoords, ycoords = trans.seq_x_y(x, y) Thanks to the excellent documentation, I solved this by using dates.date2num(): xcoords, ycoords = trans.seq_x_y(dates2num(x), y) Erik |
|
From: Vincent S. <sc...@sa...> - 2008-01-11 08:49:07
|
Now this is a totally shot in the dark, but I remember similar 'features' from good old unix times, where the X display was palette instead of true-color, and you'd start some other app that forced its own colors to the X display, thus changing the palette of other windows. No idea though why it would happen with qt4, but not with other gui libraries... Cheers, Vincent Schut. Dan Karipides wrote: > Darren, > > This is interesting. I tried to get a screenshot of the bad behavior for > you. My first attempt was to just hit "print screen". Under Fedora Core 8, > KDE window manager this brings up the application KSnapshot. When KSnapshot > gets focus, the bad behavior goes away and it was not captured in the > screenshot. > > I did notice the KSnapshot app has a snapshot delay feature. I set it to 2 > seconds, and clicked new snapshot. The KSnapshot window disappeared for 2 > seconds; the bad behavior was back for that period of time. However, even > in this case, the behavior doesn't show up in the screenshot. > > This makes me wonder if maybe it is a video driver problem. Linux has the > right colors in memory (which is I assume the level at which the snap shot > is taken), but the driver is wigging out when communicating the info to the > actual video card. > > If I manage to get a SS I will post it. > > -Dan > > -----Original Message----- > From: Darren Dale [mailto:dar...@co...] > Sent: Wednesday, January 09, 2008 3:08 PM > To: mat...@li... > Cc: Dan Karipides > Subject: Re: [Matplotlib-users] screen colors invert with matplotlib > > Could you please post a screenshot of the bad behavior? I don't see anything > > strange here, and I'm using qt-4.3.3, pyqt-4.3.3, and an nvidia GeForce > 6600. > > Darren > > On Wednesday 09 January 2008 05:00:28 pm Dan Karipides wrote: >> Do the demo apps come with the standard qt4/pyqt4 install? I just used > the >> Fedora Core 8 package manager to install both of these packages. >> >> I apologize that my knowledge of qt is limited. I'll do some > investigation >> of qt4 / pyqt4 on my own before bothering the list further. >> >> Thanks for the suggestion, >> >> -Dan >> >> -----Original Message----- >> From: Michael Droettboom [mailto:md...@st...] >> Sent: Wednesday, January 09, 2008 2:35 PM >> To: Dan Karipides >> Cc: 'Matplotlib Users' >> Subject: Re: [Matplotlib-users] screen colors invert with matplotlib >> >> I wonder if the problem exhibits itself in any other pyqt4 apps (such as >> the demo apps)... In that case, I would take your question to the pyqt >> list. Otherwise, we'll want to track down what specifically matplotlib >> is doing that causes this. >> >> Cheers, >> Mike >> > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace |
|
From: Norman D. <nor...@gm...> - 2008-01-11 03:45:25
|
On Jan 9, 2008 11:53 AM, John Hunter <jd...@gm...> wrote: > On Jan 9, 2008 9:11 AM, Michael Droettboom <md...@st...> wrote: > > > You could comment out these two lines: > > > > x = (int)x + 0.5; > > y = (int)y + 0.5; > > > > and see if that corrects your wiggliness problem, just to confirm that > > as the source. > > > > The bigger question is -- there was probably a good reason that this > > code was put in there in the first place, so it probably isn't a good > > idea to remove it en masse. It may need to be exposed as an argument so > > some things get this behavior and others don't. I know that dashed > > lines that are perpendicular to the edges of the figure (e.g. grid > > lines) look much worse if they aren't rounded to pixel centers. But in > > general for polygons, I don't know if that's true. > > For subpixel accuracy in rendering, agg antialiasing causes different > line segments to appear different in their thicknesses if they do not > have the same subpixel values. Maxim wrote the following essay on the > subject: > > http://antigrain.com/tips/line_alignment/line_alignment.agdoc.html#PAGE_LINE_ALIGNMENT > > > For this reason, to preserve visible consistency of the segments, I > have several parts in the agg code which snaps the vertices ot the > pixel centers. I have never found a solution that seems to work in > all cases, since removing the snapto code will cause the > inconsistencies referred to above. I think should probably be a > graphics context property (which could get the information from an > artist property) so at least the user could control it when needed. > > > JDH > Hi John, Hi Mike, I commented out the two lines in draw_polygon() and am now getting very smooth arrow movement in my animations. It looks GREAT! I've got my system here now set up so I can easily turn the rounding on and off, by switching the PATH, and will watch the results so I can understand more about this issue. The more I understand, the harder it looks. Being able to control this as a property of an artist would definitely work easily enough for my scenario. I'll also give the new hueristic in SVN a try and see how it works for me. Thanks for all the help! |
|
From: Erik C. <er...@ce...> - 2008-01-10 22:07:42
|
Hi!
I'm trying to make a clickable plot_date() plot (using the Pylons
framework). What I need is the pixel coordinates of the data points I
give to plot_date(), but the trans.seq_x_y() function doesn't like Datetime:
>> xcoords, ycoords = trans.seq_x_y(x, y)
float() argument must be a string or a number
How can I get the pixel coordinates?
Here are the relevant parts of my code (x is Datetime, y is float):
figure = pylab.figure(figsize=(6,4), dpi=100, frameon=False)
ax = figure.add_subplot(111)
# quick simple scatter plot
ax.plot_date(x, y, 'ro')
# Convert the data set points into screen space coordinates
trans = ax.get_transform()
xcoords, ycoords = trans.seq_x_y(x, y)
Thanks,
Erik
|
|
From: Darren D. <dar...@co...> - 2008-01-10 20:43:39
|
On Wednesday 09 January 2008 10:15:54 am Francesco Pretto wrote: > 2008/1/9, Darren Dale <dar...@co...>: > > setup.py attempts to select the appropriate backend for you, based on > > what backends were available at build time. That selection is written > > into the default matplotlibrc file, which resides in > > site-packages/matplotlib/mpl-data. If matplotlib finds another > > matplotlibrc file (for example, in the current working directory, in > > $HOME/.matplotlib, etc), then it will use those settings instead. I would > > guess that is the source of the problem. > > No, the problem is the default installed matplotlibrc, that is not > different from the one present in the source tree and has the default > selection: > > backend : TkAgg > > Now, i don't know if the build script is trying to modify it according > user selection or compile-time backend detection, but I'm wondering > why the same problem wasn't happening on linux, where I tipically > never install Tk runtime. > > However, for me the problem is solved, but if there's a matplotlib > windows dev listening, here is my experience; first, i removed the > already installed "lib/site-packages/matplotlib/mpl-data/matplotlibrc" > . Afer, I went for clean compiling with a setup.cfg with these > configurations: > > gtk = True > gtkagg = False > tkagg = False > wxagg = False > backend = GTK > > Eventually, "python setup.py install" write again a > "site-packages/matplotlib/mpl-data/matplotlibrc" which still have: > > backend : TkAgg > > If this shouldn't happen, well, consider this a bug report :D I think this is fixed. Please update from svn and try again. Darren |
|
From: Dan K. <ka...@tx...> - 2008-01-10 17:59:57
|
Just to follow up: Mike was indeed correct. I never found the qt4 demos but I did find some simple pyqt4 sample code. http://zetcode.com/tutorials/pyqt4/firstprograms/ The first example on this page causes the same problem. It really isn't a color inversion. It seems to be more of a messed up color palette. Some colors remain unchanged, other colors are wildly different. White does go to black though which is the most notable change. So this is a PyQt (or Qt?) problem. As such, I'll stop cluttering this list and move my investigation elsewhere. Thanks for your help, all. -Dan -----Original Message----- From: Michael Droettboom [mailto:md...@st...] Sent: Wednesday, January 09, 2008 2:35 PM To: Dan Karipides Cc: 'Matplotlib Users' Subject: Re: [Matplotlib-users] screen colors invert with matplotlib I wonder if the problem exhibits itself in any other pyqt4 apps (such as the demo apps)... In that case, I would take your question to the pyqt list. Otherwise, we'll want to track down what specifically matplotlib is doing that causes this. Cheers, Mike |
|
From: Michael D. <md...@st...> - 2008-01-10 16:40:33
|
You're right. It's a bug. The parser (when it was re-written) was
changed to not accept '[' as a literal symbol, since it is meaningful in
certain situations. This turned out to be overly cautious. This is
fixed in svn r4854.
Manuel Metz wrote:
> Michael Droettboom wrote:
>> You need to escape the [:
>>
>> mpl_pp.xlabel(r"$\[$")
>>
>> [] and {} have special meanings in math syntax, so to use them
>> "literally", they need to be escaped.
>
> Really? Note that Matthias had text.usetex=False.
> I tried various configurations:
>
> text.usetex=True
>
> xlabel( "$[$") okay
> xlabel(r"$\[$") okay
> xlabel( "$\[$") no error, but also no label displayed
I'm surprised by this. Those last two strings should be identical.
Maybe Python 2.5 works differently from whatever you're running.
> text.usetex=False
>
> xlabel("$[$") failed with
> Expected end of text (at char 0), (line:1, col:1)
>
> xlabel(r"$\[$")
> xlabel( "$\[$") no error, but displays a star symbol
>
> In the last two cases I got a warning
>
> mathtext.py:722: MathTextWarning: Unrecognized symbol '\['. Substituting
> with a dummy symbol.
> % sym.encode('ascii', 'backslashreplace'), MathTextWarning)
Cheers,
Mike
>> Matthias Michler wrote:
>>> Hello list,
>>>
>>> the little example below leads to an error on my system (output is
>>> attached).
>>> I used this some time ago and it worked. Now I'm using the release
>>> 0.91.2.
>>> Is there a reason to use rectangular brackets not in mathtext?
>>> (same problem occur with '{' for me.)
>>>
>>> best regards and thanks in advance for any help,
>>> Matthias
>>> -------------------------------------------------------------------------------------------------
>>>
>>> import matplotlib.pyplot as mpl_pp
>>> mpl_pp.axes()
>>> mpl_pp.xlabel("$[$")
>>> mpl_pp.show()
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>>
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|