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
(10) |
2
(30) |
3
(11) |
4
(5) |
5
(14) |
6
(21) |
7
(19) |
8
(29) |
9
(23) |
10
(5) |
11
(3) |
12
(9) |
13
(6) |
14
(12) |
15
(10) |
16
(15) |
17
(5) |
18
(6) |
19
(4) |
20
(28) |
21
(8) |
22
(5) |
23
(10) |
24
(4) |
25
(1) |
26
(6) |
27
(13) |
28
(11) |
29
(9) |
30
(23) |
|
I'm somewhat of a newbie and I have hopefully a simple question (people asking similar questions in the archive seem to be beyond this already). I have a working color fill generated using the set_facecolor command on a collection of polygons. When I try to use colorbar() I get the message: cmap = mappable.cmp AttributeError: 'NoneType' object has no object 'cmap'. This question could be a little lacking in information? Maybe someone has a bit of sample code that already does something like this? Thanks! Brian
Petr Jakes wrote: >I am trying to think how to convert image (scanned map) to the Numeric array. >My map is in Transverse Mercator projection (this is my intended >target projection as well) and it has WGS84 coordinates (datum) on it. > >I just can't figure out, how I can identify the exact pixel, where (at >least) the 3 wgs84 coordinates intersection point are located. I think >I need such a identification so I will be able to assign the >information about position (coordinates) to each image pixel during >the conversion of the image to the Numeric array? Maybe there is some >general function how to "calibrate" the picture(pixels) to the coordinates. > >Any idea about it? Or is my approach completely wrong? > >Thks and regards > >Petr > > > Petr: I think the best approach would be make your scanned map into a 'georeferenced' image (such as a geotiff). I think you can do this with gdal (http://gdal.maptools.org). Once the image is georeferenced, I can give you an example showing how to read it in using the python gdal module, convert it to an array and plot it with basemap. Sorry I can't be of more help, but this is really outside my realm of expertise. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124
Jeff, thanks a lot for giving me your advices. Please understand it is about 20 years I am from the university so it is not always easy to get things about maps etc. back to my head :) I did study your some example code http://matplotlib.sourceforge.net/screenshots/plotmap.py and I thing I am able to follow it and understand how you are using it. Generally it looks for me like you: a) read the pre-prepared (sorted) scalar field (latitudes, longitudes, values) b) store it in the three numarrays (topoin, lons , lats) c) transform coordinates (lons , lats) to the chosen projection (to the native map projection grid) + interpolate data values (topoin) to the transformed coordinates. d) assign color to the interpolated "data values" using colorpalet from the 'imshow' e) plot "new" transformed "color" scalar field over the map (please correct me, if I am wrong). Now I am reading your first posting again: ---snip--- > However, you may be able to do it by importing your image using PIL, > converting it to a Numeric array and then plotting it over the map > projection using imshow. To see how to convert an image to and from > a Numeric array see http://effbot.org/zone/pil-numpy.htm ---Snip--- I am trying to think how to convert image (scanned map) to the Numeric array. My map is in Transverse Mercator projection (this is my intended target projection as well) and it has WGS84 coordinates (datum) on it. I just can't figure out, how I can identify the exact pixel, where (at least) the 3 wgs84 coordinates intersection point are located. I think I need such a identification so I will be able to assign the information about position (coordinates) to each image pixel during the conversion of the image to the Numeric array? Maybe there is some general function how to "calibrate" the picture(pixels) to the coordinates. Any idea about it? Or is my approach completely wrong? Thks and regards Petr
Hello Aure, >Amongst other libraries, I have been using Matplotlib to build some scanning >X-ray images I will publish soon (Journal of Applied Crystallography if >accepted). I don't know if this is an issue for someone, but I would like to >include a reference, can anyone tell me if there is a standard one or whether >it is worth it for anyone to be mentioned ? > > This question has just been answered a few threads ago ("success story"). To quote JDH: > Perhaps it would be a good idea for you and others who publish with > mpl to cite it in the methods section (eg "figures x, y,and z were > generated using matplotlib") with a reference pointing to the web > site. Promotion and publicity is always a good thing. Some journals > don't allow links in the citations, in which case you could use > > @InProceedings{BarrettEtal2004, > Author = {Barrett, P. and Hunter, J.D. and Greenfield, P.}, > Title = {Matplotlib - {A} Portable {Python} Plotting Package}, > BookTitle = {Astronomical Data Analysis Software \& Systems {XIV}.}, > year = 2004 > } Niklas.
sorry, example contained syntax error... On 21/09/05 15:11:16, Jack Andrews wrote: > back to my scattered circles... can you show me =20 > how to center text (labels) inside the big =20 > circles generated by this program (follows)? =20 > help much appreciated. #!/usr/bin/env python from pylab import * N=3D5 def onecolor(c): x,y=3Drand(2,N) return scatter(x,y,c=3Dc,s=3Darray([600]+[30]*(N-1))) [r,b]=3D[onecolor(c) for c in 'red blue'.split()] # find first of each sequence of patches and # write 'red' in the red one (and 'blue' for blue) grid(True) show()
John Hunter wrote: > > 10 minutes to walk out the door to scipy. tick tock.... > > I have been heroically rebuilding gtk/pygtk from source on my > powerbook (10.3) and everything is working under X11 except my app > crashes with a fontconfig error message > > No fonts found; this probably means that the fontconfig library is > not correctly configured. You may need to edit the fonts.conf > configuration file. More information about fontconfig can be found > in the fontconfig(3) manual page and on http://fontconfig.org. > > The fontconfig file in /usr/local/etc seems to be a generic linux > setup. There is an OSX looking beast in /etc/fonts/fonts.conf > > Any quick suggestions before I run? Whatever's in /usr/local/etc has nothing to do with Apple's X11. It probably got installed with GTK somehow. How did you install GTK? You might be able to get going by copying /etc/fonts/fonts.conf to the equivalent in /usr/local/etc/. -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
>>>>> "John" == John Hunter <jdh...@ac...> writes: John> The fontconfig file in /usr/local/etc seems to be a generic John> linux setup. There is an OSX looking beast in John> /etc/fonts/fonts.conf John> Any quick suggestions before I run? Nevermind: copy the <dir> entries from /etc/fonts/fonts.conf to /usr/local/etc/fonts/fonts.conf and > sudo fc-cache Eureka! And that is what I call "in the nick of time". JDH
10 minutes to walk out the door to scipy. tick tock.... I have been heroically rebuilding gtk/pygtk from source on my powerbook (10.3) and everything is working under X11 except my app crashes with a fontconfig error message No fonts found; this probably means that the fontconfig library is not correctly configured. You may need to edit the fonts.conf configuration file. More information about fontconfig can be found in the fontconfig(3) manual page and on http://fontconfig.org. The fontconfig file in /usr/local/etc seems to be a generic linux setup. There is an OSX looking beast in /etc/fonts/fonts.conf Any quick suggestions before I run? Thanks! JDH
Dear all, Amongst other libraries, I have been using Matplotlib to build some scann= ing X-ray images I will publish soon (Journal of Applied Crystallography if accepted). I don't know if this is an issue for someone, but I would like= to include a reference, can anyone tell me if there is a standard one or whe= ther it is worth it for anyone to be mentioned ? Also, although this is not th= e correct mailing list for this, is there a general reference for Python ? Cheers, Aur=E9
>>>>> "Malte" == Malte Marquarding <Mal...@cs...> writes: Malte> Our first publication using matplotlib is with the referee. Malte> A big thanks to John. Thanks all for the kind words. I certainly had paper submission in mind when writing matplotlib. When using matlab, one thing I found is that when publishing papers I needed to have more or less total control over every figure element, from tick line width to title font weight and size, In particular, often you want the fonts a little larger for publications because the figure is shrunk down so far in the journal. One feature of mpl that I use a lot, and may be under utilized, is per directory rc files. Typically for interactive plotting I want a different set of defaults (font sizes, savefig dpi, line widths, default backend, etc) than I do for my publications, so when working on a manuscript, I often put an rc file in that directory with defaults for that publication. Perhaps it would be a good idea for you and others who publish with mpl to cite it in the methods section (eg "figures x, y,and z were generated using matplotlib") with a reference pointing to the web site. Promotion and publicity is always a good thing. Some journals don't allow links in the citations, in which case you could use @InProceedings{BarrettEtal2004, Author = {Barrett, P. and Hunter, J.D. and Greenfield, P.}, Title = {Matplotlib - {A} Portable {Python} Plotting Package}, BookTitle = {Astronomical Data Analysis Software \& Systems {XIV}.}, year = 2004 } Good luck with your publication! JDH
>>>>> "Tom" == Tom Denniston <tom...@gm...> writes: Tom> I follow this list rather closely so I am hoping that I Tom> haven't missed something obvious here. Tom> I am trying to plot a line graph with pylab.plot. I was Tom> wondering if there is an easy way to plot a smoothed line Tom> graph like excel does by default. I could obviously apply a Tom> signal filter but I was wondering if there is a simple user Tom> friendly way to get something like excel does in matplotlb Tom> without the user having to know about signal processing. It would help if you described more precisely what it is Excel does. You may be surprised to learn that I rarely use Excel for plotting <wink> In general, and with a few exceptions, mpl tries to be a plotting library, and despite some claims to the contrary, tries not to do much magic. Automatic smoothing sounds a bit dangerous to me, and as you say, is squarely in the realm of signal processing. Here is a little helper function I use to generate a smoothing functional -- it is a function that returns a function for smoothing signals with a low pass filter. import scipy.signal as sig def lowbutter(lpcf, lpsf, Fs, gpass=3, gstop=15): """ Return a low pass butterworth filter with lpcf : lowpass corner freq lpsf : lowpass stop freq gpass : corner freq attenuation gstop : stop freq attenuation return value is a callable function that will filter your data Example: mybutt = lowbutter(12, 15, eeg.freq) # pun intended sfilt = mybutt(s1) """ Nyq = Fs/2. wp = lpcf/Nyq ws = lpsf/Nyq ord, Wn = sig.buttord(wp, ws, gpass, gstop) b, a = sig.butter(ord, Wn, btype='lowpass') def func(x): return sig.lfilter(b,a,x) return func I use this function like myfilt = lowbutter(20,30,400) and then pass myfilt off to plotting or analysis code. You could easily write a smooth_plot. Here is a sketch of how it might go def smooth_plot(x, y, somefilt=lowbutter(20,30,400), **kwargs): """ plot x versus a smoothed version of y, using callable filter myfilt. kwargs are passed on to plot """ y = myfilt(y) plot(x, y, **kwargs) For bandpass data, the equivalent of lowbutter that I use is def bandpass(lpsf, lpcf, hpcf, hpsf, Fs, gpass=3, gstop=20): """ Return a butterworth bandpass filter lpcf : lowpass corner freq lpsf : lowpass stop freq hpcf : highpass corner freq hpsf : highpass stop freq gpass : corner freq attenuation gstop : stop freq attenuation return value is a callable function that will filter your data """ Nyq = Fs/2. wp = [lpcf/Nyq, hpcf/Nyq] ws = [lpsf/Nyq, hpsf/Nyq] ord, Wn = sig.buttord(wp, ws, gpass, gstop) b,a = sig.butter(ord, Wn, btype='bandpass') # pun intended def func(x): return sig.lfilter(b,a,x) return func I don't think there could be any consensus on a default value for myfilt since people work in very different time scales. A short wiki entry on the scipy web site on how to do write plotting functions with filtering built in along the lines of the examples above would be useful. http://www.scipy.org/wikis/topical_software/MatplotlibCookbook If you would like to write one up, with example figures, that would be great. Tom> Any help would be greatly appreciated. Tom> And, John and company thanks for a brilliant piece of Tom> software. Much obliged, JDH
hi all, back to my scattered circles, can you show me how =20 to center text (labels) inside the big circles =20 generated by this program (follows)? help much =20 appreciated. jack. #!/usr/bin/env python from pylab import * N=3D5 def onecolor(c): x,y=3Drand(2,N) return scatter(x,y,c=3Dc,s=3Darray([600]+[30]*(N-1))) [r,b]=3D[onecol(c) for c in 'red blue'.split()] # find first of each sequence of patches and # write 'red' in the red one (and 'blue' for blue) grid(True) show()
I follow this list rather closely so I am hoping that I haven't missed something obvious here. I am trying to plot a line graph with pylab.plot. I was wondering if there is an easy way to plot a smoothed line graph like excel does by default. I could obviously apply a signal filter but I was wondering if there is a simple user friendly way to get something like excel does in matplotlb without the user having to know about signal processing. Any help would be greatly appreciated. And, John and company thanks for a brilliant piece of software. -Tom
Our first publication using matplotlib is with the referee. A big thanks to John. Malte
>>>>> "Nadia" == Nadia Dencheva <den...@st...> writes: Nadia> Hi John, Martin, I was experimenting with drawing markers Nadia> one at a time for a ReadCursor class to provide the option Nadia> of marking the position of the cursor. I saw this email and Nadia> read the thread (the users mailing list is very helpful). Nadia> Since markers and lines go together and implementing Nadia> markers in the same way for ReadCursor would cause a lot of Nadia> code duplication, I tried pulling out the relevant Nadia> functions from lines.py and creating a Marker class - Nadia> attached. A test function is below. I am using TkAgg, so Nadia> _newstyle is True and renderer has draw_markers. x and y Nadia> in Marker.__init__ are sequences and are turned into 1d Nadia> arrays before passed to draw_markers. I get: Nadia> Traceback (most recent call last): File "test_marker.py", Nadia> line 9, in ? m.draw_marker(fcr) File Nadia> "/Users/dencheva/cvs-matplotlib/matplotlib/lib/matplotlib/markers.py", Nadia> line 556, in draw_marker markerFunc(renderer, gc, xt, yt) Nadia> File Nadia> "/Users/dencheva/cvs-matplotlib/matplotlib/lib/matplotlib/markers.py", Nadia> line 85, in _draw_pixel renderer.draw_markers(gc, path, xt, Nadia> yt) IndexError: Unexpected SeqBase<T> length. With newstyle, the signature of draw_markers is draw_markers(gc, path, rgbFace, x, y, trans) where x and y are not transformed and trans is an mpl transform. Here is the docstring from backend_bases.py def _draw_markers(self, gc, path, rgbFace, x, y, trans): """ This method is currently underscore hidden because the draw_markers method is being used as a sentinel for newstyle backend drawing path - a matplotlib.agg.path_storage instance Draw the marker specified in path with graphics context gc at each of the locations in arrays x and y. trans is a matplotlib.transforms.Transformation instance used to transform x and y to display coords. It consists of an optional nonlinear component and an affine. You can access these two components as if transform.need_nonlinear(): x,y = transform.nonlinear_only_numerix(x, y) # the a,b,c,d,tx,ty affine which transforms x and y vec6 = transform.as_vec6_val() ...backend dependent affine... """ pass You may also want to search the dev archives for more elaborate discussions. I'm short on time now so gotta run! JDH
I would like to echo Darren sentiments. John and all others that have contributed: You've really done a great job! -----Original Message----- From: Darren Dale [mailto:dd...@co...]=20 Sent: Monday, September 19, 2005 8:55 PM To: mat...@li... Subject: [Matplotlib-users] success story Hi Folks, I wanted to share a quick story. I'm in the process of wrapping up my=20 dissertation. Nearly every figure is generated with MPL, using the TeX=20 support that John spearheaded a while back. I paid a visit to the dreaded=20 thesis secretary on Friday, who has a reputation of being extremely tough.=20 She gave me an A+. John, you don't hear this frequently enough. You're the man. Darren ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Great. Thanks! Helge Avlesen wrote: > On 9/20/05, Steinar Rune Eriksen <sr...@bi...> wrote: > >>One question for me (being a new matplotlib user). When using this >>recipe to get it incorporated in Zope, I get a gray area around my >>chart. Anyway to set this to a different color (white) ? > > > you could try > > figure.facecolor : white > > in your matplotlibrc > > Helge > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
Hi list, Hi John, I'm using matplotlib in OO mode. I created an instance of Figure then add some subplots to it. from matplotlib.axes import Subplot from matplotlib.figure import Figure self.fig = Figure(figsize=(320,200), dpi=80) a = self.fig.add_subplot(1,1,1, axisbg='r') Now i create another instance of Figure. self.new_fig = Figure(figsize=(320,200), dpi=80) My aim is to add a Subplot instance to the new Figure instance and changind the number of rows and columns and the position of the Subplot. I could have done: self.new_fig.add_subplot(a) Nevertheless, it doesn't work. self.new_fig is empty when displaying it in a FigureCanvas. Furthermore, i need the property of subplot to change. a.set(2,2,1) self.new_fig.add_subplot(a) Is there any solution except to make another instance of the subplot? Thanks a lot, Philippe Collet
Hi John, Martin, I was experimenting with drawing markers one at a time for a ReadCursor class to provide the option of marking the position of the cursor. I saw this email and read the thread (the users mailing list is very helpful). Since markers and lines go together and implementing markers in the same way for ReadCursor would cause a lot of code duplication, I tried pulling out the relevant functions from lines.py and creating a Marker class - attached. A test function is below. I am using TkAgg, so _newstyle is True and renderer has draw_markers. x and y in Marker.__init__ are sequences and are turned into 1d arrays before passed to draw_markers. I get: Traceback (most recent call last): File "test_marker.py", line 9, in ? m.draw_marker(fcr) File "/Users/dencheva/cvs-matplotlib/matplotlib/lib/matplotlib/markers.py", line 556, in draw_marker markerFunc(renderer, gc, xt, yt) File "/Users/dencheva/cvs-matplotlib/matplotlib/lib/matplotlib/markers.py", line 85, in _draw_pixel renderer.draw_markers(gc, path, xt, yt) IndexError: Unexpected SeqBase<T> length. What am I doing wrong? If I set _newstyle explicitely to False, in order to test this part of the various draw_* functions, I don't get any errors but a marker is not plotted. So, again I must be doing something wrong. If I understand this correctly I need the same functionality as Martin. If either of you have any ideas of what is wrong, I'd appreciate any help. Also we don't have to reinvent the wheel independently, so if this is not the right approach and Martin has a better way I am willing to help with this, by testing or any other way. Thanks, Nadia Dencheva
>>>>> "Nadezhda" == Nadezhda Dencheva <den...@st...> writes: Nadezhda> I can only add that for me the crash appears only in Nadezhda> ipython on OS X with this particular font. It is in the Nadezhda> set_text function and after I added print statements it Nadezhda> went away. From reading the mailing list and when other Nadezhda> people get crash, it seems that the only common thing is Nadezhda> the font - Vera.ttf. Nadezhda> Is there a way to tell matplotlib what font to use? Paul did add support for this when writing the font manager. You should be able to do, eg from matplotlib.font_manager import FontProperty prop = FontProperty(fname='/path/to/somefont.ttf') xlabel('some text', fontproperties=prop) Since you said the crash went away when you added a print statement, my guess is that there is a bad pointer haunting us in the font module that is cropping up (or not) in different contexts. If you get any more information, let us know. JDH
I can only add that for me the crash appears only in ipython on OS X with this particular font. It is in the set_text function and after I added print statements it went away. From reading the mailing list and when other people get crash, it seems that the only common thing is the font - Vera.ttf. Is there a way to tell matplotlib what font to use? (after I removed the print statements (nothing else changed) matplotlib doesn't load this font any more, so I can't reproduce the crash.) If I can tell it to use Vera.ttf and reproduce it, this will help keep my sanity. Nadia John Hunter wrote: >>>>>>"Christian" == Christian Kristukat <ck...@ho...> writes: > > > Christian> Hi, the WXAgg backend of 0.84 produces segfaults on > Christian> linux using wxPython2.6-gtk2-unicode-2.6.1.0-1_py2.3. > > Have you verified that it is wxagg specific? Eg, what do happens with > the following backends: WX, Agg, PS? > > Christian> This is the debugging output: > Christian> found Bitstream Vera Sans, normal, normal 500, normal, > Christian> 12.0 findfont returning /usr/share/matplotlib/Vera.ttf > Christian> Segmentation fault > > Nadia recently reported a crash in the font module in OS X when > loading Vera.ttf, but hers was only in ipython. Weird. What version > of freetype are you using? She was using 2.1.9 think. > > It would really help if we could nail this down, but I haven't been > able to replicate it on my end yet. If you could edit src/ft2font.cpp > and fint the Ft2Font::set_text function. Add a lot of lines thoughout > that function like > > _VERBOSE("FT2Font::set_text 1"); > //some code here > _VERBOSE("FT2Font::set_text 2"); > //some code here > _VERBOSE("FT2Font::set_text 3"); > > and then switch VERBOSE=True in setup.py and reinstall. I sometimes > go through a couple of iterations ("poorman's binary search") to find > the precise line that is crashing. > > Note it is only a guess that the crash is in set_text, based on the > information I got from Nadia when we left off on this issue, but the > VERBOSE output will give more precise information in this regard. > > JDH > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
It sounds like you want step_pts from http://www.american.edu/econ/pytrix/pytrix.py Maybe. Alan Isaac def step_pts(x, y): =09'''Given x and y, return points for step function plot. =09:Parameters: =09 - `x`: [x0,x1,...,xn] list of x values (first coordinate) =09 - `y`: [y0,y1,...,yn] list of y values (second coordinate) =09:rtype: tuple of lists =09:return: (xnew,ynew) =09=09where xnew=3D(x0,x1,x1,...,xn,xn) and ynew=3D(y0,y0,y1,y1,...,yn). =09:author: Alan G. Isaac =09:since: 2005年05月15日 =09'''=20 =09pts=3Dzip(x,y) #original points as tuples =09inter =3D zip(x[1:],y[:-1]) #new points as tuples =09#now splice pts and inter -> list of all points as tuples =09pts_inter =3D [j for i in map(None,pts,inter) for j in i][:-1] =09#split the points list into (x-coordinates),(y-coordinates) =09z =3D zip(*pts_inter)=20 =09return z[0],z[1]
John Hunter wrote: >>>>>>"Christian" == Christian Kristukat <ck...@ho...> writes: > > > Christian> Hi, the WXAgg backend of 0.84 produces segfaults on > Christian> linux using wxPython2.6-gtk2-unicode-2.6.1.0-1_py2.3. > > Have you verified that it is wxagg specific? Eg, what do happens with > the following backends: WX, Agg, PS? > It happens only with WXAgg. > > _VERBOSE("FT2Font::set_text 1"); > //some code here > _VERBOSE("FT2Font::set_text 2"); > //some code here > _VERBOSE("FT2Font::set_text 3"); > the error doesn't seem to be related to set_text: FT2Font::set_text FT2Font::set_text 1 FT2Font::set_text 2 FT2Font::set_text 3 FT2Font::set_text 4 FT2Font::set_text 5 FT2Font::set_text 5 FT2Font::set_text 5 FT2Font::set_text 6 FT2Font::set_text done FT2Font::getattr FT2Font::draw_glyphs_to_bitmap FT2Font::compute_string_bbox FT2Font::draw_bitmap FT2Font::draw_bitmap FT2Font::draw_bitmap RendererAgg::draw_text GCAgg::GCAgg GCAgg::points_to_pixels GCAgg::get_color GCAgg::antialiased GCAgg::_set_linecap GCAgg::_set_joinstyle GCAgg::_set_dashes GCAgg::_set_clip_rectangle RendererAgg::set_clipbox_rasterizer RendererAgg::set_clipbox_rasterizer done SeparableTransformation::eval_scalars Affine::eval_scalars Affine::eval_scalars DONE Affine::operator _transforms_module::new_value _transforms_module::new_value _transforms_module::new_point Point::Point _transforms_module::new_value _transforms_module::new_value _transforms_module::new_point Point::Point _transforms_module::new_bbox Bbox::Bbox Value::get Bbox::~Bbox Point::~Point Value::~Value Value::~Value Point::~Point Value::~Value Value::~Value Value::get Interval::~Interval Bbox::get_bounds Value::get Christian
Nils Wagner wrote: > Steve Schmerler wrote: > >>Nils Wagner wrote: >> >>>Hi all, >>> >>>Is it intended that a variety of messages like >>> >>>LazyValue::init_type >>>Value::init_type >>>BinOp::init_type >>>Point::init_type >>>Interval::init_type >>>Bbox::init_type >>>Func::init_type >>>FuncXY::init_type >>>Transformation::init_type >>>SeparableTransformation::init_type >>>NonseparableTransformation::init_type >>>Affine::init_type >>>init_nc_transforms >>>Glyph::init_type >>>FT2Font::init_type >>>_transforms_module::new_value >>>_transforms_module::new_value >>>_transforms_module::new_point >>>Point::Point >>>_transforms_module::new_value >>>_transforms_module::new_value >>>_transforms_module::new_point >>>Point::Point >>>_transforms_module::new_bbox >>>Bbox::Bbox >>>_transforms_module::new_value >>>_transforms_module::new_value >>>_transforms_module::new_point >>>Point::Point >>>_transforms_module::new_value >>>_transforms_module::new_value >>>_transforms_module::new_point >>>Point::Point >>>_transforms_module::new_bbox >>>Bbox::Bbox >>>_transforms_module::new_func >>>_transforms_module::new_func >>>_transforms_module::new_separable_transformation >>>BBoxTransformation::BBoxTransformation >>>SeparableTransformation::SeparableTransformation >>>init_nc_image >>>Image::init_type >>>_transforms_module::new_value >>>Value::~Value >>>init_nc_backend_agg >>> >>>appear on the screen ? I am using the latest cvs version. >>> >>>Nils >>> >>> >>> >>>------------------------------------------------------- >>>SF.Net email is sponsored by: >>>Tame your development challenges with Apache's Geronimo App Server. >>>Download >>>it for free - -and be entered to win a 42" plasma tv or your very own >>>Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >>>_______________________________________________ >>>Matplotlib-users mailing list >>>Mat...@li... >>>https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >> >>Hi >> >>Did you compile with VERBOSE = True? >> >>cheers, >>steve >> > > I have used > > python setup.py build > python setup.py install > > to install matplotlib. Where can I find this flag ? > > Nils > > Hi in setup.py When you say plot(...) you will see a lot of such messages. cheers, steve
>>>>> "Martin" == Martin Richter <law...@gm...> writes: Martin> Hello everyone, Hello John, Martin> as you advised in a Mail some days ago concerning a Martin> fastplot-command I wrote a polygon_factory and it worked Martin> quite well (In large parts taken from Line2D). See the Martin> code attached. What I now want to ask you is: Would it be Martin> good to write this object-oriented (propably yes, so one Martin> gets rid of all those tiny funktions _make_...(size))? One Martin> drawback which comes into my mind is: How should this Martin> class be used within fastplot()? Initialize an instance Martin> each time you plot a single point? Wouldn't this slow down Martin> everything a bit (or am I overestimating the time-scales)? Martin> On the otherhand using a class would look very 'tidy'. Yes, it would be tidy, but you might pay for that in performance as you suggest. As far as tidiness, you can use the existing approach and not add all the _make* functions the __all__ list the module exports -- this would make the helper functions invisible. You could also use nested scopes def my_factory(*args): def helper1(x): pass def helper2(x): pass do_something_and_return() However, since the code you use to compute the vertices is lifted from lines.py, it would be nice to define one set of functions that could be reused by both the line marker code and polygon code. This would be the cleanest design and would be easier to maintain, but it would require refactoring both your code and the lines.py code a little. If you want to take this on, that would be great. JDH