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
(4) |
2
(20) |
3
(8) |
4
(10) |
5
(4) |
6
(8) |
7
(4) |
8
(9) |
9
(11) |
10
(12) |
11
(13) |
12
(3) |
13
(17) |
14
(4) |
15
|
16
(10) |
17
(9) |
18
(11) |
19
(4) |
20
(17) |
21
(6) |
22
(9) |
23
(35) |
24
(17) |
25
(9) |
26
(16) |
27
(17) |
28
(14) |
From: Johann R. <jr...@su...> - 2009-02-23 19:49:44
|
Johann Rohwer wrote: > I'm trying to insert a custom set of axes within a subplot, much like > the axes_demo.py. Only difference is, now I want an inset graph > inside each of a number of subplots. Using ASCII art, much like the > following: > > > |-------------------| > | | > | | > | ----- | > | | | | > | ----- | > |-------------------| > > |-------------------| > | | > | | > | ----- | > | | | | > | ----- | > |-------------------| > > Where the whole thing would be the figure, containing 2 subplots each > with an inset. > > Is there any way to have the rect coordinates of > fig.add_axes(rect) > to refer to the axes coordinates of the respective subplot, and not of > the complete figure? (In reality there are actually 12 subplots, not > only 2.... To answer my own question, after browsing the docstrings I came up with the following attached minimal script to illustrate a solution to the problem. However, it appears crufty. Specifically, 1. Can the fig.add_axes() call not take a transform directly as optional argument, like in fig.add_axes([.4, .1, .5, .3], transform=ax.transAxes)? This would appear the natural solution but does not work. 2. The transformed bounding box gives coordinates in points, necessitating the division by figure width and figure height to revert back to fractional coordinates. 3. Re-calculating [l, b, w, h] from tBbox seems cumbersome. Can the add_axes() not call a Bbox instance directly? I'm sure I'm missing something obvious but don't have the time to delve into the transforms sourcecode, so any pointer is appreciated :-) Johann |
From: Eric F. <ef...@ha...> - 2009-02-23 19:49:35
|
Dante Plicato wrote: > Hi Eric, > first of all thank you for your reply. > My problem is so simple that it is diffucult to explain :) > may be pictures speak better than me. > Let me show you 2 simple pictures and you'll understand: > > this is what i want to do: (done with excel) > http://89.96.100.40/~dante/wish.png > (2 simple bars centered in a short enough x axis) > > and this is what i have with matplotlib: > http://89.96.100.40/~dante/hist.png That's very helpful. Using mpl from svn, I get quite a different result, and much closer to what you want. What version of mpl are you using? Can you update to the latest release, or to svn? I think that if you do that, and use the bar examples included with mpl, you will be able to get the desired result. Eric > > Thank you again for your time, > dp > > > 2009/2/23 Eric Firing <ef...@ha...>: >> Dante Plicato wrote: >>> Hi all, >>> i just want to have a simple 2-bar histogram, >>> and my problem is that i want my axis to be with NON-squared aspect, >>> i.e. the y-axes automatically scaled (and this yet works this way),but >>> the x-axis to be as long as it need to display 2 little bars. >>> Instead i get a squared graph with 2 big bars. >>> I also tried using something like "plt.axis([0,1,0,mymax*1.2])", >>> changing the second value, but this affects the scale and NOT my >>> picture aspect ratio. >> I'm sorry; I haven't been able to figure out what you want the plot to look >> like, and I suspect others on the list may be having the same problem. >> >> When you describe the bars as "big" or "little", are you referring to width? >> Height? spacing? >> >> When I run your script, I don't see anything that I would describe as >> "squared aspect". What physical dimensions would you like the axes to have, >> and what physical dimensions would you like the bars to have? >> >> Maybe you can make a sketch using characters to show what you >> want the plot to look like, e.g., >> >> ___________________ >> | | >> | ____ | >> | | | ____ | >> | | | | | | >> ------------------- >> >> Also, is there a reason you are using two calls to "bar" instead of one? >> Note that arguments such as color can be sequences. >> >> Eric >> >>> >>> This is my simploe source: >>> >>> import numpy as np >>> import matplotlib >>> import matplotlib.pyplot as plt >>> >>> N = 1 >>> ind = np.arange(N) >>> width = 0.05 >>> >>> rects2 = plt.bar(ind+width, 100, width, color='g') >>> rects1 = plt.bar(ind, 200, width, color='b') >>> >>> I tried many things, figsize, axis.. i have no idea, >>> probably because i'm new to matplotlib programming >>> >>> Thank you very much for any help, >>> my best >>> |
From: Andres L. <and...@ut...> - 2009-02-23 19:44:26
|
Jeff Whitaker wrote: > Andres Luhamaa wrote: > >> Hello! >> When trying to make a simple map of Europe with countries drawn, one can >> see that coastlines and country borders are not consistent. >> Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish >> somewhere in the sea, to name just a few. Is this a known issue and is >> there a solution (coming at least)? >> >> Simple script, little zooming will help to see better. >> >> Best regards, >> Andres >> >> Simple script: >> #!/usr/bin/env python >> import numpy as np >> from mpl_toolkits.basemap import Basemap >> import matplotlib.pyplot as plt >> m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2, >> projection='lcc',lat_0=60,lon_0=0., >> resolution ='i',area_thresh=1000.) >> fig=plt.Figure() >> m.drawcoastlines() >> m.drawcountries() >> plt.show() >> >> >> > Andres: We get the country boundary database from Generic Mapping > Tools, so unless they fix it, we won't have a fix. If you can suggest a > better database that does not have this problem, I can try to > incorporate it. > > I guess it is possible is also possible that this is intentional - and > the border does extend into the sea. > > -Jeff > Thank You for the answer. It really might be intentional, because the border in sea never seems to be straight when it is drawn and actually now looking the same borders in google maps, there is a strong similarity. But I still think there might be an option to not draw the borders on the sea, mask them out somehow. Would it be complicated to add such an option or am I the only one disturbed by such an appearance? Andres > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Paul A. L. <pau...@gm...> - 2009-02-23 19:37:00
|
On 23. feb.. 2009, at 14.51, Darren Dale wrote: > On Mon, Feb 23, 2009 at 3:59 AM, Paul Anton Letnes <pau...@gm... > > wrote: > Hi everyone, > > I'm having issues using LaTeX text processing with the xpdf > distiller. After playing with my settings, I finally managed to get > vector graphics output using LaTeX test processing. However, a weird > error message pops up in the terminal every time (mostly annoying, > the plotting actually works): > > Error: No paper information available - using defaults > Error: No display font for 'Courier' > Error: No display font for 'Courier-Bold' > Error: No display font for 'Courier-BoldOblique' > Error: No display font for 'Courier-Oblique' > Error: No display font for 'Helvetica' > Error: No display font for 'Helvetica-Bold' > Error: No display font for 'Helvetica-BoldOblique' > Error: No display font for 'Helvetica-Oblique' > Error: No display font for 'Symbol' > Error: No display font for 'Times-Bold' > Error: No display font for 'Times-BoldItalic' > Error: No display font for 'Times-Italic' > Error: No display font for 'Times-Roman' > Error: No display font for 'ZapfDingbats' > > I attach my matplotlibrc file for reference. Note especially the > stuff at the end with usetex=True and distiller = xpdf. If you know > any other settings that might work better, please let me know! I > suspect these settings are the sources of my annoying error messages. > > Do you have the relevant latex font packages installed? Like psnfss? > I suspect this is an issue with your latex installation, not > matplotlib. > > Darren > First of all, the "No paper info available" should not be relevant for fonts? Second, this problem appeared recently, after an upgrade of matplotlib. But, it could be that you are right. I still don't know how to fix it, though, and latex itself gives no error messages. I'm thinking there's something with xpdf. Paul. |
From: Eric F. <ef...@ha...> - 2009-02-23 18:45:25
|
Laurent Mychkine wrote: > hi, > > I'm using polar bars to plot windroses. Since the 0.98.5 version i have > some issues with the plots. > The 0° bar is not displayed in the good way. This bar is > located between -0.26 radian and 0.26 radian but it is printed > counterclockwise. > It was working perfectly with matplotlib version 0.98.3. I just switched to > version 0.98.5 because of the NaN bug of the previous version. The bug was fixed on Jan. 2. Can you install mpl from svn? Or just patch your installation with the attached diff? (Only the first hunk is critical for the bug.) Eric > > Any idea how i could make it work again ? > Ty!! > > from pylab import * > nb_secteur=12 > > fig = figure(2,figsize=(8,8)) > ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True,) > > thetagrids([90,45,0,315,270,225,180,135], > labels=["N","NE","E","SE","S","SO","O","NO"]) > theta = arange(0.0-pi/nb_secteur, 2*pi-pi/nb_secteur, 2*pi/nb_secteur) > > radii = [10.,20,10,5,3,4,3,4,6,4,2,9] > > width = 2*pi/nb_secteur > > bars = ax.bar(theta, radii, width=width, bottom=0.0 ) > for r,bar in zip(radii, bars): > bar.set_facecolor( 'blue') > bar.set_alpha(0.3) > > text(1,0.69,"%",transform = ax.transAxes) > show() > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Eric F. <ef...@ha...> - 2009-02-23 18:40:15
|
mcdevitts wrote: > Hello, > > I've been trying to implement a smith chart like a previous gentlemen on the > list and have run into a similar problem. When my angle value goes from -pi > to pi I get an extraneous circle from the interpolation. From the previous > posts, I am under the impression that this is a known issue and has been > corrected. Am I correct? If so, I am still having this issue using version > 0.98.5.2 of matplotlib. > > Regards, > Sean McDevitt Yes, this is known and was fixed on January 2. Can you update from svn? Eric |
From: Craig F. <cf...@ie...> - 2009-02-23 17:09:33
|
Okay, I figured it out. The people who maintain the Gentoo ebuild for matplotlib decided to remove the "unnecessary" copies of fonts, pycxx and pyparser that are bundled with matplotlib. The latest version of the ebuild contains code that explicitly removes the bundled fonts, pyparser and pycxx modules. I would never have thought to look there if you hadn't pointed this out. I posted a bug on Gentoo (260025) requesting that they use the bundled pyparsing module, and check with the matplotlib developers about the other "redundant" packages before deleting them. Thanks for your help. Craig ----- Original Message ---- From: Michael Droettboom <md...@st...> To: Craig Finch <cf...@ie...> Cc: mat...@li... Sent: Monday, February 23, 2009 9:49:06 AM Subject: Re: [Matplotlib-users] Crash when trying to show a semilog or log-log plot Strange. I am unable to reproduce this with 0.98.2 (0.98.3 or 0.98.5)... It's happening inside of the math expression renderer, which is used to draw the exponents that happen with semilog and log-log axes. It doesn't, however, appear to be font-related, which is a frequent installation/system problem. What is strange about this traceback is that it is using the system-wide installed version of pyparsing.py, and not the one that comes with matplotlib. matplotlib is very sensitive to small version changes in pyparsing, so we distribute our own copy and try to use it. If you temporarily move /usr/lib/python2.4/site-packages/pyparsing.py to another location, does that solve the problem? If so, I will look into how we're importing pyparsing.py to ensure we always use the local copy. Mike Craig Finch wrote: > I am using matplotlib-0.98.5.2 and getting a strange crash when trying to show() a window with semilog or log-log axes. Here is a simple script that will cause the crash: > > import pylab > from numpy import * > x = arange(1., 10., 0.1) > y = x**2 > pylab.semilogx(x,y) > pylab.show() > > At the end of this message is a sample of the output. I had to cut it down because it's apparently stuck in a loop in pyparsing.py and keeps outputting the same repetitive message. Did I find a bug here? Any suggestions would be appreciated. > > Craig > > Sample output: > ------------------------------------------------------ > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line 352, in expose_event > self._render_figure(self._pixmap, w, h) > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py", line 75, in _render_figure > FigureCanvasAgg.draw(self) > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 279, in draw > self.figure.draw(self.renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/figure.py", line 772, in draw > for a in self.axes: a.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/axes.py", line 1601, in draw > a.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 710, in draw > tick.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 193, in draw > self.label1.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 452, in draw > bbox, info = self._get_layout(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 252, in _get_layout > w, h, d = renderer.get_text_width_height_descent( > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 152, in get_text_width_height_descent > ox, oy, width, height, descent, fonts, used_characters = \ > File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2808, in parse > box = self._parser.parse(s, font_output, fontsize, dpi) > File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2259, in parse > self._expression.parseString(s) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 1065, in parseString > loc, tokens = self._parse( instring, 0 ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2577, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2690, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > > ------------- snip ------------- > > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2309, in parseImpl > loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2321, in parseImpl > raise ParseSyntaxException(pe) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 230, in __init__ > super(ParseSyntaxException, self).__init__( > TypeError: super() argument 1 must be type, not classobj > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > 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: brent.nash <bre...@jp...> - 2009-02-23 17:05:47
|
Thanks for the feedback. So strangely enough it seems to have something to do with my installation of matplotlib or some of the other background libraries. I took the exact same example that I sent it and ran it on Redhat Enterprise Linux 4 and it works just fine. My team develops on Mac OS X & Linux, but only deploys on Linux, so this isn't a huge problem, but it'd be nice to have it working everywhere? Is there any definitive set of instructions for getting matplotlib to build and install properly on Mac OS X 10.5? I had to install all of the following on my Mac: numpy scipy libpng freetype Fortran compiler (F95 I think) pkgconfig matplotlib nose Undoubtedly there's plenty of opportunity in there for me to mess something up. Thanks for all the feedback so far. ~Brent Jae-Joon Lee wrote: > > What version of maploltib are you using? > Your data displayed with correct scale with my installation of > matplotlib 0.98.5.2. > By the way, you're chaning the axes limit of the wrong axes. > "matplotlib.pyplot.axes()" create a new axes. > > Use plt.xlim (or plt.ylim for y-limit), or use the method of the existing > axes. > > -JJ > > > > > On Thu, Feb 19, 2009 at 8:22 PM, Nash, Brent R > <bre...@jp...> wrote: >> Hey everyone, >> >> I'm fairly new to matplotlib, but have read through tons of the >> documentation today and have a decent understanding of it. All the >> auto-scaling, xlim, and x_bound stuff works fine for me with the >> examples, >> but as soon as I try to use it on my data, it's not working for me. I've >> attached a demo script, 2 input files of data, and a PNG showing the >> resulting chart I get. The numbers on my Y-axis range from 7656 to 59928 >> (a >> difference of 52272) and the numbers on my X-axis range from >> 1.22896144017e+12 to 1.22896155012e+12 (a difference of 109950). >> >> The plot should look like a monotonically increasing line, but the >> resulting >> plot always comes out looking like a vertical line. I realize that the >> plot >> is actually correct, the problem is the default scaling on the ouptut. >> The >> easy way to justify this to yourself is to take the line "ert = float(i)" >> in >> the script and replace it with "ert = float(i) - 1228960000000" to >> reduce >> the ert #'s to a manageable size and then everything plots very nicely. >> The >> data is all linear, not logarithmic or anything, so I don't think writing >> a >> custom scaler is the solution. >> >> I left commented out sections in my script of all the different methods >> I've >> tried to scale this thing. I've tried all permutations I could think of >> for >> the following functions: >> >> matplotlib.pyplot.axes().autoscale_view(...) >> matplotlib.pyplot.axes().set_xbound(...) >> matplotlib.pyplot.axes().set_xlim(...) >> matplotlib.pyplot.axes().set_aspect(...) >> matplotlib.pyplot.axis(...) >> matplotlib.pyplot.axes().set_xscale(...) >> >> Can anyone catch what I'm doing wrong here? I'm hoping it's just >> something >> obvious due to my unfamiliarity with the tool. >> >> Is there any way to write my own custom autoscale algorithm? >> >> Thanks very much for your time/help! >> >> ~Brent >> >> PS ~ Here's my OS info: >> >> MacBook Pro Laptop >> Mac O X 10.5.6 >> 2.6 GHz Intel Core 2 Duo >> 4GB 667 MHz DDR2 SDRAM >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, >> CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the >> Enterprise >> -Strategies to boost innovation and cut costs with open source >> participation >> -Receive a $600 discount off the registration fee with the source code: >> SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/matplotlib-issue%3A-cannot-auto-scale-X-axis-of-plop-properly-tp22154005p22165604.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michael D. <md...@st...> - 2009-02-23 16:56:01
|
Thanks for getting to the bottom of this. I'll add some comments to the bug, too. Mike Craig Finch wrote: > Okay, I figured it out. The people who maintain the Gentoo ebuild for matplotlib decided to remove the "unnecessary" copies of fonts, pycxx and pyparser that are bundled with matplotlib. The latest version of the ebuild contains code that explicitly removes the bundled fonts, pyparser and pycxx modules. I would never have thought to look there if you hadn't pointed this out. I posted a bug on Gentoo (260025) requesting that they use the bundled pyparsing module, and check with the matplotlib developers about the other "redundant" packages before deleting them. > > Thanks for your help. > > Craig > > > > ----- Original Message ---- > From: Michael Droettboom <md...@st...> > To: Craig Finch <cf...@ie...> > Cc: mat...@li... > Sent: Monday, February 23, 2009 9:49:06 AM > Subject: Re: [Matplotlib-users] Crash when trying to show a semilog or log-log plot > > Strange. I am unable to reproduce this with 0.98.2 (0.98.3 or 0.98.5)... > > It's happening inside of the math expression renderer, which is used to draw the exponents that happen with semilog and log-log axes. It doesn't, however, appear to be font-related, which is a frequent installation/system problem. > > What is strange about this traceback is that it is using the system-wide installed version of pyparsing.py, and not the one that comes with matplotlib. matplotlib is very sensitive to small version changes in pyparsing, so we distribute our own copy and try to use it. If you temporarily move /usr/lib/python2.4/site-packages/pyparsing.py to another location, does that solve the problem? If so, I will look into how we're importing pyparsing.py to ensure we always use the local copy. > > Mike > > Craig Finch wrote: > >> I am using matplotlib-0.98.5.2 and getting a strange crash when trying to show() a window with semilog or log-log axes. Here is a simple script that will cause the crash: >> >> import pylab >> from numpy import * >> x = arange(1., 10., 0.1) >> y = x**2 >> pylab.semilogx(x,y) >> pylab.show() >> >> At the end of this message is a sample of the output. I had to cut it down because it's apparently stuck in a loop in pyparsing.py and keeps outputting the same repetitive message. Did I find a bug here? Any suggestions would be appreciated. >> >> Craig >> >> Sample output: >> ------------------------------------------------------ >> File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line 352, in expose_event >> self._render_figure(self._pixmap, w, h) >> File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py", line 75, in _render_figure >> FigureCanvasAgg.draw(self) >> File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 279, in draw >> self.figure.draw(self.renderer) >> File "//usr/lib/python2.4/site-packages/matplotlib/figure.py", line 772, in draw >> for a in self.axes: a.draw(renderer) >> File "//usr/lib/python2.4/site-packages/matplotlib/axes.py", line 1601, in draw >> a.draw(renderer) >> File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 710, in draw >> tick.draw(renderer) >> File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 193, in draw >> self.label1.draw(renderer) >> File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 452, in draw >> bbox, info = self._get_layout(renderer) >> File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 252, in _get_layout >> w, h, d = renderer.get_text_width_height_descent( >> File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 152, in get_text_width_height_descent >> ox, oy, width, height, descent, fonts, used_characters = \ >> File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2808, in parse >> box = self._parser.parse(s, font_output, fontsize, dpi) >> File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2259, in parse >> self._expression.parseString(s) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 1065, in parseString >> loc, tokens = self._parse( instring, 0 ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2577, in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2690, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache >> >> ------------- snip ------------- >> >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2309, in parseImpl >> loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2321, in parseImpl >> raise ParseSyntaxException(pe) >> File "/usr/lib/python2.4/site-packages/pyparsing.py", line 230, in __init__ >> super(ParseSyntaxException, self).__init__( >> TypeError: super() argument 1 must be type, not classobj >> >> >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >> -Strategies to boost innovation and cut costs with open source participation >> -Receive a $600 discount off the registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> 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 > > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Jeff W. <js...@fa...> - 2009-02-23 16:37:57
|
Andres Luhamaa wrote: > Hello! > When trying to make a simple map of Europe with countries drawn, one can > see that coastlines and country borders are not consistent. > Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish > somewhere in the sea, to name just a few. Is this a known issue and is > there a solution (coming at least)? > > Simple script, little zooming will help to see better. > > Best regards, > Andres > > Simple script: > #!/usr/bin/env python > import numpy as np > from mpl_toolkits.basemap import Basemap > import matplotlib.pyplot as plt > m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2, > projection='lcc',lat_0=60,lon_0=0., > resolution ='i',area_thresh=1000.) > fig=plt.Figure() > m.drawcoastlines() > m.drawcountries() > plt.show() > > Andres: We get the country boundary database from Generic Mapping Tools, so unless they fix it, we won't have a fix. If you can suggest a better database that does not have this problem, I can try to incorporate it. I guess it is possible is also possible that this is intentional - and the border does extend into the sea. -Jeff |
From: Andres L. <and...@ut...> - 2009-02-23 16:24:57
|
Hello! When trying to make a simple map of Europe with countries drawn, one can see that coastlines and country borders are not consistent. Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish somewhere in the sea, to name just a few. Is this a known issue and is there a solution (coming at least)? Simple script, little zooming will help to see better. Best regards, Andres Simple script: #!/usr/bin/env python import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2, projection='lcc',lat_0=60,lon_0=0., resolution ='i',area_thresh=1000.) fig=plt.Figure() m.drawcoastlines() m.drawcountries() plt.show() |
From: Gregor S. <gre...@gm...> - 2009-02-23 15:57:49
|
1. Where can I find a good tutorial or set of examples for embeding matplotlib in Tkinter ? 2. Problem: I created a simple test with Tkinter. First I plot my graph on __init__ (it works ok). Then I want to clear graph and plot on the same canvas with different parameters. The thing is that plot shows up only when I resize my window. Any idea what could I be doing wrong ? I was trying draw method but it doasn't work... Here is my code: Thanks for your help. Gregor Skrt #!/usr/bin/env python import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi , cos from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from Tkinter import * import sys class App: def __init__(self,master): frame = Frame(master) frame.pack() self.button= Button(frame,text='Quit',fg="black",command=frame.quit) self.button.pack(side=LEFT) self.hi_there=Button(frame,text="Plot Inverse sin",command=self.plotnew) self.hi_there.pack(side=LEFT) # place a graph somewhere here self.f = Figure(figsize=(5,4), dpi=100) self.a = self.f.add_subplot(111) self.t = arange(0.0,3.0,0.01) self.s = sin(2*pi*self.t) self.a.grid(True) self.a.set_xlabel("cas [s]") self.a.set_ylabel("amplituda") self.a.plot(self.t,self.s) self.canvas = FigureCanvasTkAgg(self.f, master=root) self.canvas.show() self.canvas.get_tk_widget().pack(side=TOP, fill=BOTH, expand=1) def plotnew(self): #get values from controller board, database #self.f.clf() # clear the figure self.t=arange(0.0,5.0,0.05) self.s1=sin(2*pi*self.t) self.s2=self.s1*-1 self.a.plot(self.t,self.s1,self.t,self.s2) root=Tk() app=App(root) root.mainloop() |
From: Michael D. <md...@st...> - 2009-02-23 15:34:59
|
What platform are you on? There is apparently no good way to find the path to the Tcl/Tk header files. The setup script currently tries to import Tkinter, and create a window, in order to make an API call that returns the path. (Crazy, I know). Therefore, if it can't create a window (for example you're on a remote terminal without X forwarding), this will fail. In that case, matplotlib uses a hardcoded path to Tcl/Tk which is platform-specific. Does it fail to compile the TkAgg backend later on? If so, can you send the compiler output message? That will at least show us where it is looking for the Tcl/Tk header files. Note that different versions of Tcl/Tk and different Linux distributions put these files in different places, so it's a constant battle to keep up with the hardcoded paths. If you're running the latest Whiz-bang Linux Alpha, or something, that might explain it. Mike Nils Wagner wrote: > Hi all, > > How can I resolve the following backend problem ? > What are the default library and include directories for > tcl and tk ? > Where should I define DISPLAY in that context ? > > python setup.py build --help > > OPTIONAL BACKEND DEPENDENCIES > libpng: 1.2.7 > Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 > * Using default library and > include directories for > * Tcl and Tk because a Tk window > failed to open. > * You may need to define DISPLAY > for Tk to work so > * that setup can determine where > your libraries are > * located. > > > Any pointer would be appreciated. > > Nils > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > 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: Michael D. <md...@st...> - 2009-02-23 15:23:56
|
I can't reproduce this here (on RHEL4 with mpl 0.98.5). What version of matplotlib is in the enthought distribution? > python Python 2.5.2 (r252:60911, May 7 2008, 12:40:32) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.__version__ '0.98.5.3' What would be helpful to narrow this down is a backtrace from gdb. Just run "gdb python", then "run script.py" (where script.py is the path to the script that segfaults). When it segfaults, it should drop you back to the debugger prompt, where you can type "bt" to get a backtrace. Copy-and-paste that back here, and it may give us some clues. Mike Goyo wrote: > El sáb, 21-02-2009 a las 16:26 -0800, Daniel Soto escribió: > >> i'd like to plot some data, get user input, and then plot the original >> data and user input. when i try to show() the data i get a segfault >> after about ten seconds. >> >> any clue what i'm doing wrong? using mac os x 10.5 with enthought >> distribution. >> >> thanks, >> drs >> >> #!/usr/bin/env python >> >> import pylab >> >> x = pylab.arange(0,10,0.1) >> y = pylab.sin(x) >> >> # plot and get user input, then close fig >> pylab.plot(x,y) >> points = pylab.ginput(2) >> points = pylab.array(points) >> pylab.close() >> >> # replot with chosen points >> pylab.plot(x,y) >> pylab.plot(points[:,0],points[:,1],'ko') >> pylab.show() >> # wait for it, wait for it...now segfault >> > > Your code works for me in Ubuntu 8.10, mpl 0.98.5.2 (Debian package!) > and GTKAgg backend. > > Goyo > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > 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: Michael D. <md...@st...> - 2009-02-23 14:49:19
|
Strange. I am unable to reproduce this with 0.98.2 (0.98.3 or 0.98.5)... It's happening inside of the math expression renderer, which is used to draw the exponents that happen with semilog and log-log axes. It doesn't, however, appear to be font-related, which is a frequent installation/system problem. What is strange about this traceback is that it is using the system-wide installed version of pyparsing.py, and not the one that comes with matplotlib. matplotlib is very sensitive to small version changes in pyparsing, so we distribute our own copy and try to use it. If you temporarily move /usr/lib/python2.4/site-packages/pyparsing.py to another location, does that solve the problem? If so, I will look into how we're importing pyparsing.py to ensure we always use the local copy. Mike Craig Finch wrote: > I am using matplotlib-0.98.5.2 and getting a strange crash when trying to show() a window with semilog or log-log axes. Here is a simple script that will cause the crash: > > import pylab > from numpy import * > x = arange(1., 10., 0.1) > y = x**2 > pylab.semilogx(x,y) > pylab.show() > > At the end of this message is a sample of the output. I had to cut it down because it's apparently stuck in a loop in pyparsing.py and keeps outputting the same repetitive message. Did I find a bug here? Any suggestions would be appreciated. > > Craig > > Sample output: > ------------------------------------------------------ > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line 352, in expose_event > self._render_figure(self._pixmap, w, h) > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py", line 75, in _render_figure > FigureCanvasAgg.draw(self) > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 279, in draw > self.figure.draw(self.renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/figure.py", line 772, in draw > for a in self.axes: a.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/axes.py", line 1601, in draw > a.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 710, in draw > tick.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 193, in draw > self.label1.draw(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 452, in draw > bbox, info = self._get_layout(renderer) > File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 252, in _get_layout > w, h, d = renderer.get_text_width_height_descent( > File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 152, in get_text_width_height_descent > ox, oy, width, height, descent, fonts, used_characters = \ > File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2808, in parse > box = self._parser.parse(s, font_output, fontsize, dpi) > File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2259, in parse > self._expression.parseString(s) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 1065, in parseString > loc, tokens = self._parse( instring, 0 ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2577, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2690, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > > ------------- snip ------------- > > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2309, in parseImpl > loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2321, in parseImpl > raise ParseSyntaxException(pe) > File "/usr/lib/python2.4/site-packages/pyparsing.py", line 230, in __init__ > super(ParseSyntaxException, self).__init__( > TypeError: super() argument 1 must be type, not classobj > > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > 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: Darren D. <dsd...@gm...> - 2009-02-23 13:51:56
|
On Mon, Feb 23, 2009 at 3:59 AM, Paul Anton Letnes < pau...@gm...> wrote: > Hi everyone, > > I'm having issues using LaTeX text processing with the xpdf distiller. > After playing with my settings, I finally managed to get vector graphics > output using LaTeX test processing. However, a weird error message pops up > in the terminal every time (mostly annoying, the plotting actually works): > > Error: No paper information available - using defaults > Error: No display font for 'Courier' > Error: No display font for 'Courier-Bold' > Error: No display font for 'Courier-BoldOblique' > Error: No display font for 'Courier-Oblique' > Error: No display font for 'Helvetica' > Error: No display font for 'Helvetica-Bold' > Error: No display font for 'Helvetica-BoldOblique' > Error: No display font for 'Helvetica-Oblique' > Error: No display font for 'Symbol' > Error: No display font for 'Times-Bold' > Error: No display font for 'Times-BoldItalic' > Error: No display font for 'Times-Italic' > Error: No display font for 'Times-Roman' > Error: No display font for 'ZapfDingbats' > > I attach my matplotlibrc file for reference. Note especially the stuff at > the end with usetex=True and distiller = xpdf. If you know any other > settings that might work better, please let me know! I suspect these > settings are the sources of my annoying error messages. > Do you have the relevant latex font packages installed? Like psnfss? I suspect this is an issue with your latex installation, not matplotlib. Darren |
From: Nils W. <nw...@ia...> - 2009-02-23 13:47:18
|
Hi all, How can I resolve the following backend problem ? What are the default library and include directories for tcl and tk ? Where should I define DISPLAY in that context ? python setup.py build --help OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.7 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 * Using default library and include directories for * Tcl and Tk because a Tk window failed to open. * You may need to define DISPLAY for Tk to work so * that setup can determine where your libraries are * located. Any pointer would be appreciated. Nils |
From: Johann R. <jr...@su...> - 2009-02-23 11:09:15
|
I'm trying to insert a custom set of axes within a subplot, much like the axes_demo.py. Only difference is, now I want an inset graph inside each of a number of subplots. Using ASCII art, much like the following: |-------------------| | | | | | ----- | | | | | | ----- | |-------------------| |-------------------| | | | | | ----- | | | | | | ----- | |-------------------| Where the whole thing would be the figure, containing 2 subplots each with an inset. Is there any way to have the rect coordinates of fig.add_axes(rect) to refer to the axes coordinates of the respective subplot, and not of the complete figure? (In reality there are actually 12 subplots, not only 2.... Or is there another easy way to accomplish this? Johann |
From: Paul A. L. <pau...@gm...> - 2009-02-23 08:59:38
|
Hi everyone, I'm having issues using LaTeX text processing with the xpdf distiller. After playing with my settings, I finally managed to get vector graphics output using LaTeX test processing. However, a weird error message pops up in the terminal every time (mostly annoying, the plotting actually works): Error: No paper information available - using defaults Error: No display font for 'Courier' Error: No display font for 'Courier-Bold' Error: No display font for 'Courier-BoldOblique' Error: No display font for 'Courier-Oblique' Error: No display font for 'Helvetica' Error: No display font for 'Helvetica-Bold' Error: No display font for 'Helvetica-BoldOblique' Error: No display font for 'Helvetica-Oblique' Error: No display font for 'Symbol' Error: No display font for 'Times-Bold' Error: No display font for 'Times-BoldItalic' Error: No display font for 'Times-Italic' Error: No display font for 'Times-Roman' Error: No display font for 'ZapfDingbats' I attach my matplotlibrc file for reference. Note especially the stuff at the end with usetex=True and distiller = xpdf. If you know any other settings that might work better, please let me know! I suspect these settings are the sources of my annoying error messages. Cheers, Paul. |
From: mcdevitts <mcd...@gm...> - 2009-02-23 07:52:24
|
Hello, I've been trying to implement a smith chart like a previous gentlemen on the list and have run into a similar problem. When my angle value goes from -pi to pi I get an extraneous circle from the interpolation. From the previous posts, I am under the impression that this is a known issue and has been corrected. Am I correct? If so, I am still having this issue using version 0.98.5.2 of matplotlib. Regards, Sean McDevitt -- View this message in context: http://www.nabble.com/Polar-Plot%3A--Extraneous-Circles-tp22156864p22156864.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Jae-Joon L. <lee...@gm...> - 2009-02-23 06:03:20
|
Please take a look at our gallery to see what you can do with matplotlib. http://matplotlib.sourceforge.net/gallery.html > I am working on the eye movement data of our driving experiment. It would be > interesting to look at the spatial distribution, and most frequent visited > AOIs. You'd better tell us how you want to look at the spatial distribution, more specifically. A simple 2d-scatter plot as in your excel file is quite easy with matplotlib. Take a look at the tutorial (http://matplotlib.sourceforge.net/users/pyplot_tutorial.html) > I have produced eye movement data for one subject (please check the > attachment). > Besides spatial distribution of fixation, I also would like to look at the > frequency of fixation at each spatial location, with different color > denoting the frequency of fixation, just like the fixation heat map in the > attachment. Your question is more about how to process your data, rather than how to plot. You need to process your data somehow to produce a 2d array, and after that you can show that image with matplotlib. Matplotlib itself does not support much of such processing as far as I know. What I usually do is to bin the data in a regular 2d image (you may use histogram2d function in numpy), and do some smoothing (with adaptive smoothing size if preferred). Then plot the resulting image with matplotlib. Unfortunately, I don't know of any good adaptive smoothing tool for python. I do this with other standalone program, and use matplotlib just to plot. Of course there are other ways. As far as you process your data into 2d image, you can plot it with matplotlib. Regards, -JJ > Could you please bother to let me know how can I draw the heat map of > fixation?Thanks! > > He Jibo > he...@gm... > ji...@cy... > > > --------------------------- > He Jibo > Department of Psychology, > Beckman Institute for Advanced Science and Technology > University of Illinois, Urbana Champaign, > 603 East Daniel St., > Champaign, IL 61820 > Tel: 217-244-4461(office) > 217-244-6763(lab) > Email: he...@gm... > Robert Benchley - "Drawing on my fine command of the English language, I > said nothing." > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Jae-Joon L. <lee...@gm...> - 2009-02-23 04:39:11
|
> > This is in contrast to the effect of the following code: > > try: > from math import * > import pylab as p > except: > print "Couldn't import all dependent libraries" > sys.exit() > dataLength = 100 > data = [sin(2*pi*x/dataLength) for x in range(0,dataLength)] > p.plot(data) > newXTicks= [str(x/2.0) for x in p.xticks()[0]] > p.xticks(p.xticks()[0], newXTicks) > p.show() > > This code produces tick marks [0, 10, 20, 30, 40, 50]. However when > zooming, the xtick marks do not adjust correctly to the zoomed > regions. > Setting the tick locations explicitly means that you want the mpl to stick to what you just provided and not to automatically adjust the tick locations. And that's the behavior you're seeing. Guessing from your code, it seems that you're fine with tick locations but want to change the format of the tick label. check the docmentation and also the example (custom_ticker1.py). http://matplotlib.sourceforge.net/api/ticker_api.html Here's what you may try: from matplotlib.ticker import FuncFormatter dataLength = 100 data = [sin(2*pi*x/dataLength) for x in range(0,dataLength)] p.plot(data) def label_half(x, pos): return str(x/2.) gca().xaxis.set_major_formatter(FuncFormatter(label_half)) p.draw() p.show() -JJ |
From: Jae-Joon L. <lee...@gm...> - 2009-02-23 04:13:25
|
> > 1) WIthin this same pick handler function, have another if conditional, > but for the case when the user is picking the legend. In other words, I > want to pick the legend artist, not a Line2D artist. I'm afraid but it is not clear what you want here (at least to me). Can you just pick up the legend patch? If what you want is to check if the picked-up line2d artist is one of the legend handles, you may explicitly do that (see the attached example code). > > 2) Modify the above so the user can pick only the actual points on a line, > but not the connecting line if I have plotted it like 'o-' style (connected > points). You know the data points of the line and the position of the mouse event, can you just check if the event is nearby the point? You may do that before the "pick_event" is triggered, i.e., by using the custom picker (contains) function. See the attached example. The "contains_points" function is derived from the contain method of the Line2D class. Also check the examples under the event_handling directory. -JJ > > I hope this is clear. Any help is appreciated. Thanks. > Che > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Dean W. <dea...@gm...> - 2009-02-23 03:04:13
|
Hello, I execute the following code: try: from math import * import pylab as p except: print "Couldn't import all dependent libraries" sys.exit() dataLength = 100 data = [sin(2*pi*x/dataLength) for x in range(0,dataLength)] p.plot(data) p.show() This produces a figure window. When I zoom in regions of the plot, the xticks change correctly to the zoomed region. This is in contrast to the effect of the following code: try: from math import * import pylab as p except: print "Couldn't import all dependent libraries" sys.exit() dataLength = 100 data = [sin(2*pi*x/dataLength) for x in range(0,dataLength)] p.plot(data) newXTicks= [str(x/2.0) for x in p.xticks()[0]] p.xticks(p.xticks()[0], newXTicks) p.show() This code produces tick marks [0, 10, 20, 30, 40, 50]. However when zooming, the xtick marks do not adjust correctly to the zoomed regions. Your help on this issue would be great, thanks! |
From: Eric F. <ef...@ha...> - 2009-02-23 02:56:44
|
Nash, Brent R wrote: > Hey everyone, > > I'm fairly new to matplotlib, but have read through tons of the > documentation today and have a decent understanding of it. All the > auto-scaling, xlim, and x_bound stuff works fine for me with the > examples, but as soon as I try to use it on my data, it's not working > for me. I've attached a demo script, 2 input files of data, and a PNG > showing the resulting chart I get. The numbers on my Y-axis range from > 7656 to 59928 (a difference of 52272) and the numbers on my X-axis range > from 1.22896144017e+12 to 1.22896155012e+12 (a difference of 109950). > > The plot should look like a monotonically increasing line, but the > resulting plot always comes out looking like a vertical line. I realize > that the plot is actually correct, the problem is the default scaling on > the ouptut. The easy way to justify this to yourself is to take the > line "ert = float(i)" in the script and replace it with "ert = float(i) > - 1228960000000" to reduce the ert #'s to a manageable size and then > everything plots very nicely. The data is all linear, not logarithmic > or anything, so I don't think writing a custom scaler is the solution. After removing unused imports your script works for me with mpl from svn. Can you update your mpl to svn? Or to the newest release, if that is not what you are already using? It appears that you must be hitting a bug that has been fixed, but I have no idea what it was or when it was fixed. Eric > > I left commented out sections in my script of all the different methods > I've tried to scale this thing. I've tried all permutations I could > think of for the following functions: > > matplotlib.pyplot.axes().autoscale_view(...) > matplotlib.pyplot.axes().set_xbound(...) > matplotlib.pyplot.axes().set_xlim(...) > matplotlib.pyplot.axes().set_aspect(...) > matplotlib.pyplot.axis(...) > matplotlib.pyplot.axes().set_xscale(...) > > Can anyone catch what I'm doing wrong here? I'm hoping it's just > something obvious due to my unfamiliarity with the tool. > > Is there any way to write my own custom autoscale algorithm? > > Thanks very much for your time/help! > > ~Brent > > PS ~ Here's my OS info: > > MacBook Pro Laptop > Mac O X 10.5.6 > 2.6 GHz Intel Core 2 Duo > 4GB 667 MHz DDR2 SDRAM > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |