Re: [Matplotlib-users] Failure compiling MPL on Snow Leopard
Dear Jeremy, I'm not sure but I think it may be the problem with ppc, cause this architecture was dropped for Snow Leopard as far as I remember. So just delete -arch ppc and try again. In general you may try to use this description: http://blog.hyperjeff.net/?p=160 I've tested it and it works. Cheers, Jakub On 03/09/2010 04:54 AM, Jeremy Conlin wrote: I am trying to compile MPL on Snow Leopard without success. I have a fairly fresh system (10.6.2) with python.org 2.6.4 installed. I have downloaded the MPL trunk with svn. I had to make a small change to the make.osx file because there are some extra . However I still can't get MPL to compile/install; it fails when compiling zlib. The change I made in the make.osx file is on line 11. It used to be: ARCH_FLAGS=-arch i386 -arch ppc -arch x86_64 and is now: ARCH_FLAGS=-arch i386 -arch ppc -arch x86_64 The error I get while compiling is copied below. Can anyone help me figure out what is wrong? Thanks, Jeremy x zlib-1.2.3/zutil.h Checking for gcc... Building static library libz.a version 1.2.3 with gcc. Checking for unistd.h... No. Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf() Checking for snprintf() in stdio.h... No. WARNING: snprintf() not found, falling back to sprintf(). zlib can build but will be open to possible buffer-overflow security vulnerabilities. Checking for return value of sprintf()... No. WARNING: apparently sprintf() does not return a value. zlib can build but will be open to possible string-format security vulnerabilities. Checking for errno.h... No. Checking for mmap support... No. gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o adler32.o adler32.c gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o compress.o compress.c gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o crc32.o crc32.c In file included from crc32.c:29: zutil.h:21:24: error: stddef.h: No such file or directory zutil.h:23:22: error: string.h: No such file or directory zutil.h:24:22: error: stdlib.h: No such file or directory crc32.c:36:24: error: limits.h: No such file or directory In file included from crc32.c:29: zutil.h:21:24: error: stddef.h: No such file or directory zutil.h:23:22: error: string.h: No such file or directory zutil.h:24:22: error: stdlib.h: No such file or directory crc32.c:36:24: error: limits.h: No such file or directory In file included from crc32.c:29: zutil.h:21:24: error: stddef.h: No such file or directory zutil.h:23:22: error: string.h: No such file or directory zutil.h:24:22: error: stdlib.h: No such file or directory crc32.c:36:24: error: limits.h: No such file or directory gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o gzio.o gzio.c lipo: can't figure out the architecture type of: /var/tmp//cc9xNLIP.out make[1]: *** [crc32.o] Error 1 make[1]: *** Waiting for unfinished jobs gzio.c:10:19: error: stdio.h: No such file or directory and more errors below. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape
Hello all, I submitted some code to matplotlib-users last September to perform contouring of triangular grids. The posts and code can be found at: http://sourceforge.net/mailarchive/forum.php?thread_name=4AB3B95B.3090903%40noaa.govforum_name=matplotlib-users Like I wrote at the time, if it is useful to enough people I'm happy to improve the code provided it can be incorporated into mpl as I have no interest in maintaining it as a standalone project. Ian On 8 March 2010 23:33, gely g...@usc.edu wrote: Christopher Barker wrote: gely wrote: As I think about it, I'm going to have to write code to do this (contour an unstructured triangular mesh) sometime soon, so please let me know if it does exist already -- if not I'll try to remember to contribute it when I get around to it. -Chris Chris, I found this old thread. Did you ever find code to directly interpolate a triangulation? sorry, no, not yet. Do you already have the triangulation? if so, it's pretty easy to contour. Thanks for the reply. Yes. I have the triangulation as a list of point coordinates and a list of triangles with indices to the points. Good to know it's not difficult. I'll have to chew on this for a bit. -Geoff -- View this message in context: http://old.nabble.com/Contour-Plotting-of-Varied-Data-on-a-Shape-tp25089018p27829342.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib 0.99.3rc1 release candidate for testing
I have uploaded the src and some binaries for the matplotlib 0.99.3 (stable branch) release candidate rc1 . This is a bugfix release that contains at least one critical bugfix (the path.simplify bug) and numerous other small fixes. I built the OSX binaries on a 64 bit 10.6 python2.6 machine so I don't think they will work on earlier OS X boxes (but am not sure). This is a new machine for the binaries so please test if you are able. If you have access to an older OS X server that I can use to build binaries for older platforms I would be willing to try (my powerbook died). Any of you who know a lot about building compatible OSX binaries across python and OS release versions please advise. The release candidate for testing are available at: http://drop.io/xortel1# Thanks to Christoph Gohlke for the win32 builds. He did not upload 64bit win32 builds with the following explanation: Given the numpy 1.4.0 ABI mess, I do not think 64 bit Windows binaries should be released at the moment. There was supposed to be a numpy 1.4.1 release a month ago, but it is still not out. I can create 64 bit binaries with GTK/Qt/Cairo support once numpy 1.4.1/2.0 is released. The svn log of changes since the last release are below. JDH r8181 | efiring | 2010-03-08 10:09:55 -0800 (Mon, 08 Mar 2010) | 2 lines dates.py: fix num2jul, jul2num; fixes bug 2963391; thanks to G. Lichtenberg r8179 | leejjoon | 2010-03-05 15:51:22 -0800 (Fri, 05 Mar 2010) | 1 line fix a bug in SubplotDivider.new_horizontal that gave incrroect result when pack_start=True r8175 | leejjoon | 2010-03-03 10:03:30 -0800 (Wed, 03 Mar 2010) | 1 line fix arguments of allow_rasterization.draw_wrapper r8174 | jdh2358 | 2010-03-03 09:15:58 -0800 (Wed, 03 Mar 2010) | 1 line added support for favicon in docs build r8173 | jdh2358 | 2010-03-03 08:56:16 -0800 (Wed, 03 Mar 2010) | 1 line applied Mattias get_bounds patch r8172 | jdh2358 | 2010-03-03 08:31:42 -0800 (Wed, 03 Mar 2010) | 1 line fix svnmerge download instructions r8171 | jdh2358 | 2010-03-03 07:47:48 -0800 (Wed, 03 Mar 2010) | 1 line added favicon r8160 | mdboom | 2010-02-26 08:27:22 -0800 (Fri, 26 Feb 2010) | 2 lines Fix offset_copy: the fig argument should be optional. r8146 | mdboom | 2010-02-22 08:22:28 -0800 (Mon, 22 Feb 2010) | 1 line Backporting numpy version check fix to 0.99 branch r8145 | jdh2358 | 2010-02-22 06:31:45 -0800 (Mon, 22 Feb 2010) | 1 line fix setters for regular polygon r8135 | leejjoon | 2010-02-16 14:55:27 -0800 (Tue, 16 Feb 2010) | 1 line fix a bug in Text._get_layout that returns an incorrect information for an empty string r8121 | jdh2358 | 2010-02-08 09:50:27 -0800 (Mon, 08 Feb 2010) | 1 line added Ariels csd patch for proper scaling at the dc component r8116 | mdboom | 2010-02-08 07:57:45 -0800 (Mon, 08 Feb 2010) | 1 line Fix for libpng-1.4 compatibility r8092 | leejjoon | 2010-01-18 16:26:16 -0800 (Mon, 18 Jan 2010) | 1 line update annotate documentation to explain *annotation_clip* parameter r8070 | mdboom | 2010-01-04 06:28:57 -0800 (Mon, 04 Jan 2010) | 1 line Fix doc 'clean' r8068 | mdboom | 2010-01-04 06:14:38 -0800 (Mon, 04 Jan 2010) | 2 lines Fix bug in PDF, PS, SVG and OS-X backends: do not simplify filled paths. r8057 | mdboom | 2009-12-31 07:46:58 -0800 (Thu, 31 Dec 2009) | 2 lines [2916753] Wrong API signature- yscale r8036 | jdh2358 | 2009-12-16 11:21:44 -0800 (Wed, 16 Dec 2009) | 1 line add mpl book to index sidebar r8016 | heeres | 2009-12-09 16:09:03 -0800 (Wed, 09 Dec 2009) | 2 lines Mplot3d: fix scatter3d markers bug r8003 | mdboom | 2009-12-03 11:21:28 -0800 (Thu, 03
Re: [Matplotlib-users] matplotlib 0.99.3rc1 release candidate for testing
Hey, no offense to the numpy developers! They are doing a great job and the Python 3 support in the numpy 2.0 release is well worth the wait. What I meant was that ATM there is no officially released numpy version that one can use to build an official win-amd64 matplotlib binary (same for any other scientific python package). Matplotlib works good on 64 bit when compiled against numpy 1.4.0svn. Christoph On 3/9/2010 9:08 AM, John Hunter wrote: Given the numpy 1.4.0 ABI mess, I do not think 64 bit Windows binaries should be released at the moment. There was supposed to be a numpy 1.4.1 release a month ago, but it is still not out. I can create 64 bit binaries with GTK/Qt/Cairo support once numpy 1.4.1/2.0 is released. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
Enssle Carl Philipp wrote: Hallo. When importing string in python, letters are defined as follows: import string string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ... whereas when importing matplotlib, the order of letters seems to be changed: import matplotlib string.letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' Would be grateful for a comment. Philipp Hello Philipp, I'm not able to replicate the behavior you describe. import sys sys.version '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]' import matplotlib matplotlib.__version__ '0.99.1' import string string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' -- jv Carl Philipp Enssle Environmental Technology Engineer AF-Colenco Ltd, Groundwater Protection and Waste Disposal Visiting address: Täfernstrasse 26 | CH-5405 Baden | Switzerland Direct: +41 (0)56 483 15 48 | Fax: +41 (0)56 483 18 82 carl-philipp.ens...@afconsult.com | www.af-colenco.com -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
On Tue, Mar 9, 2010 at 11:28 AM, Enssle Carl Philipp carl-philipp.ens...@colenco.ch wrote: Hallo. When importing string in python, letters are defined as follows: import string string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' … whereas when importing matplotlib, the order of letters seems to be changed: import matplotlib string.letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' Would be grateful for a comment. I'm seeing this here too: In [1]: import string In [2]: string.letters Out[2]: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' In [3]: import matplotlib In [4]: string.letters Out[4]: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' That's just bizarre. This is on 0.99.1.1 on OpenSUSE 11.2 Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing efir...@hawaii.edu wrote: Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from svn. I have done a little grepping and other exploration, but have completely failed to find where this change is occurring. cbook imports locale -- may be implicated: string.letters¶ The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called. See if simply importing locale first has the same effect. JDH -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
John Hunter wrote: On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing efir...@hawaii.edu wrote: Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from svn. I have done a little grepping and other exploration, but have completely failed to find where this change is occurring. cbook imports locale -- may be implicated: string.letters¶ The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called. See if simply importing locale first has the same effect. No effect here. Eric JDH -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
On Mar 9, 2010, at 1:22 PM, John Hunter wrote: On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing efir...@hawaii.edu wrote: Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from svn. I have done a little grepping and other exploration, but have completely failed to find where this change is occurring. cbook imports locale -- may be implicated: string.letters¶ The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called. See if simply importing locale first has the same effect. It seems to be an interaction between numpy and locale. I can reproduce the problem with: import locale import numpy as np preferredencoding = locale.getpreferredencoding() import string print string.letters The bug disappears after removing the numpy import. -Tony -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Bad eps output
Hi, This import pylab as pl pl.plot([3,6,3,7,3]) pl.xlabel(Xlabel) pl.savefig(test.eps) gives me an unpleasant outfile with the backends GTK, GTKAgg, WXAgg, WX, Agg, GDK and PS. It works fine only with Cairo and GTKCairo. I'm on trunk and Ubuntu 8.04. All backends do fine for png. It's actually pl.xlabel that kills the eps, if it's replaced by pl.title() everything works again. Not sure when this problem appeared, but probably not so long ago. Cheers, Olle -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
Tony S Yu wrote: On Mar 9, 2010, at 1:22 PM, John Hunter wrote: On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing efir...@hawaii.edu wrote: Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from svn. I have done a little grepping and other exploration, but have completely failed to find where this change is occurring. cbook imports locale -- may be implicated: string.letters¶ The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called. See if simply importing locale first has the same effect. It seems to be an interaction between numpy and locale. I can reproduce the problem with: import locale import numpy as np preferredencoding = locale.getpreferredencoding() cbook also calls locale.getpreferredencoding() when it is imported. Eric import string print string.letters The bug disappears after removing the numpy import. -Tony -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting
Hi, We have been working on a python wx app GUI for finding and selecting metadata (lots of lists and check boxes) from a test (that later fetches SQL time-history data for further processing in LabView or elsewhere). As an afterthought, we decided to add in a small function that would allow previewing (plotting) of time-history data based on the selected metadata. The objective is to have a window pop up with the plotted time history data and allow the user to zoom, scroll etc, without closing or exiting the original GUI for selecting the metadata. The reason I want a pop up window is because I don't want to change the original metadata selection GUI (it's too complicated) What I've done so far is: Added a button to the metadata GUI called plot. In the OnPlotButton event handler I embedded the plotting code. The plot button works fine when I click it the first time. However, problems occur when I decide to plot a different set of data (without starting over the metadata GUI). I'd like to choose some new metadata, then click on the plot button again. But as of present, this causes the figure to show a gray image (no lines plotted) and then both GUIs hang up. I've tried closing the figure manually prior to selecting new metadata and clicking on plot but it still causes the metadata GUI to lock up. Based on what I've been reading regarding MPL, it seems that the matplotlib show() function causes another instance of a GUI loop to remain suspended. Is there any way to get the pop-up figure to show the time-history data and remain interactive (zoom, scroll, etc) and be able to re-plot or replace the current plot? I thought about using the draw() function but I couldn't get it to pop-up the figure. Also, if I'm not mistaken, the draw() function doesn't allow for interactive control? I think this issue is similar to the issue described here: http://mail.python.org/pipermail/pythonmac-sig/2005-March/013365.html but I can't seem to find a simple solution, without embedding the plot figure directly into the existing GUI (not something easy to do as I'm not a very experienced Python programmer) Please let me know if anyone can help. Here is my code: def OnPlotButton(self, event): global SelTestID, SelRunList, SelEventID, SelChanList, SelCycList if self.notebook.GetSelection() == 0: SelTestID = self.listCtrlStatus.GetItem(0,1).GetText()#.strip(, ).split(, ) if self.listCtrlStatus.GetItem(2,0).GetText() == Event Selected: : SelRunList = self.listCtrlStatus.GetItem(1,1).GetText().strip(, ).split(, ) SelChanList = [] SelCycList = [] SelEventID = self.listCtrlStatus.GetItem(2,1).GetText()#.strip(, ).split(, ) else: if self.listCtrlStatus.GetItem(1,1).GetText() == All: SelRunList = [] for iRun in range(self.checkListRuns.GetItemCount()): SelRunList.append(str(self.checkListRuns.GetItemText(iRun))) else: SelRunList = self.listCtrlStatus.GetItem(1,1).GetText().strip(, ).split(, ) SelChanList = self.checkListBoxChans.GetCheckedStrings() if self.listCtrlStatus.GetItem(3,1).GetText() == All: SelCycList = [] else: SelCycList = self.listCtrlStatus.GetItem(3,1).GetText().strip(, ).split(, ) SelEventID = '' elif self.notebook.GetSelection() == 1: SelTestID = self.listCtrlStatus.GetItem(0,1).GetText()#.strip(, ).split(, ) SelRunList = self.listCtrlStatus.GetItem(1,1).GetText().strip(, ).split(, ) SelChanList = [] SelCycList = [] SelEventID = '' ##VTS.MsgBox(Test,eWO: + SelTestID + \nRuns: + str(SelRunList) + \nChans: + str(SelChanList) + \nCycles: + str(SelCycList) + \nEvent: + SelEventID) #cleanup to prevent memory leak if previously plotted plt.close('all') ##make sure all figure windows are closed fig = [] ax = [] #prep data for plotting plotting myeWO = str(SelTestID) nRuns = len(SelRunList) myRuns = [] for iRuns in range(nRuns): myRuns.append(str(SelRunList[iRuns])) nChans = len(SelChanList) myChans = [] for iChan in range(nChans): myChans.append(str(SelChanList[iChan])) dataLst = VTS.FetchSQLRunDataByName(myeWO, myRuns, myChans) lenData = len(dataLst) dataArry = np.zeros((lenData, nChans + 1)) for iPoint in range(lenData): dataArry[iPoint] = dataLst[iPoint] #begin plotting fig = plt.figure(1) ax = fig.add_subplot(111) myPlotLines = [] for iChan in range(nChans): tempLine, = ax.plot(dataArry[:,0], dataArry[:,iChan+1], label = myChans[iChan])
Re: [Matplotlib-users] Bug: string.letters
Eric Firing wrote: Tony S Yu wrote: On Mar 9, 2010, at 1:22 PM, John Hunter wrote: On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing efir...@hawaii.edu wrote: Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from svn. I have done a little grepping and other exploration, but have completely failed to find where this change is occurring. cbook imports locale -- may be implicated: string.letters¶ The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called. See if simply importing locale first has the same effect. It seems to be an interaction between numpy and locale. I can reproduce the problem with: import locale import numpy as np preferredencoding = locale.getpreferredencoding() cbook also calls locale.getpreferredencoding() when it is imported. Confirmation: In [1]:import string In [2]:string.letters Out[2]:'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' In [3]:import locale In [4]:locale.getpreferredencoding () Out[4]:'UTF-8' In [5]:string.letters Out[5]:'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' The lesson seems to be that the only proper use for string.letters is for testing membership, in which case the order does not matter. Eric Eric import string print string.letters The bug disappears after removing the numpy import. -Tony -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: string.letters
On 2010-03-09 12:37 PM, Eric Firing wrote: Eric Firing wrote: Tony S Yu wrote: On Mar 9, 2010, at 1:22 PM, John Hunter wrote: On Tue, Mar 9, 2010 at 12:16 PM, Eric Firingefir...@hawaii.edu wrote: Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from svn. I have done a little grepping and other exploration, but have completely failed to find where this change is occurring. cbook imports locale -- may be implicated: string.letters¶ The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called. See if simply importing locale first has the same effect. It seems to be an interaction between numpy and locale. I can reproduce the problem with: import locale import numpy as np preferredencoding = locale.getpreferredencoding() cbook also calls locale.getpreferredencoding() when it is imported. Confirmation: In [1]:import string In [2]:string.letters Out[2]:'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' In [3]:import locale In [4]:locale.getpreferredencoding () Out[4]:'UTF-8' In [5]:string.letters Out[5]:'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' PyGTK calls locale.setlocale() and thus may be affecting string.letters. The lesson seems to be that the only proper use for string.letters is for testing membership, in which case the order does not matter. Yes. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting
Pribadi, Krishna wrote: Based on what I’ve been reading regarding MPL, it seems that the matplotlib show() function causes another instance of a GUI loop to remain suspended. right --don't use show(), in fact, don't use pylab for the most part: http://www.scipy.org/Cookbook/Matplotlib/EmbeddingInWx and see the embedding_in_wx examples as well. I personally like wxMPL: http://agni.phys.iit.edu/~kmcivor/wxmpl/ -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape
Ian Thomas wrote: I submitted some code to matplotlib-users last September to perform contouring of triangular grids. The posts and code can be found at: http://sourceforge.net/mailarchive/forum.php?thread_name=4AB3B95B.3090903%40noaa.govforum_name=matplotlib-users Like I wrote at the time, if it is useful to enough people I'm happy to improve the code provided it can be incorporated into mpl as I have no interest in maintaining it as a standalone project. I think it would be great to have in MPL. What code are you using for the triangulation? Does it do constrained delauney? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting
On Tue, Mar 9, 2010 at 2:23 PM, Chris Barker chris.bar...@noaa.gov wrote: Pribadi, Krishna wrote: Based on what I’ve been reading regarding MPL, it seems that the matplotlib show() function causes another instance of a GUI loop to remain suspended. right --don't use show(), in fact, don't use pylab for the most part: http://www.scipy.org/Cookbook/Matplotlib/EmbeddingInWx and see the embedding_in_wx examples as well. I would agree with Chris that you should bite the bullet and embed it. That you are new to Python shouldn't be too much of a problem if you follow the recipe linked there. Note that the top links on that page are broken, but if you go to one of the last links: http://www.scipy.org/Matplotlib_figure_in_a_wx_panel ...this works. And if you need help getting it going, people can help you. Don't worry about all the fancy graphing stuff there, the draw method could have just been: def draw( self ): Draw data. if not hasattr( self, 'subplot' ): self.subplot = self.figure.add_subplot( 111 ) self.subplot.plot( [1,2,3]) and you could lose all the numpy geometry code and it would have been a boring plot but a simpler block of code. :D Che -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting
On Tue, Mar 9, 2010 at 1:23 PM, Chris Barker chris.bar...@noaa.gov wrote: Pribadi, Krishna wrote: Based on what I’ve been reading regarding MPL, it seems that the matplotlib show() function causes another instance of a GUI loop to remain suspended. right --don't use show(), in fact, don't use pylab for the most part: http://www.scipy.org/Cookbook/Matplotlib/EmbeddingInWx This page is badly out of date (half the links are broken) JDH -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting
I know it's badly out of date... I'd like to embed it but I'm not quite sure where to begin... Do you think a simple solution like calling it from the system command line will open the plot in a new instance, so that the metadata GUI wont be hung up by the show()? I'd have to pass the selected metadata to a temporary file on disk. It's a bit of a dirty method... Thoughts? -Original Message- From: John Hunter [mailto:jdh2...@gmail.com] Sent: Tuesday, March 09, 2010 1:40 PM To: Chris Barker Cc: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting On Tue, Mar 9, 2010 at 1:23 PM, Chris Barker chris.bar...@noaa.gov wrote: Pribadi, Krishna wrote: Based on what I've been reading regarding MPL, it seems that the matplotlib show() function causes another instance of a GUI loop to remain suspended. right --don't use show(), in fact, don't use pylab for the most part: http://www.scipy.org/Cookbook/Matplotlib/EmbeddingInWx This page is badly out of date (half the links are broken) JDH -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users This communication (including any attachments) is for the use of the intended recipient(s) only and may contain information that is confidential, privileged or otherwise legally protected. Any unauthorized use or dissemination of this communication is prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bad eps output
Thanks for the report. I am able to reproduce it and am investigating further. As a workaround, you can set the rcParam 'ps.fonttype' to 42 (at the expense of some file size). Mike Olle Engdegård wrote: Hi, This import pylab as pl pl.plot([3,6,3,7,3]) pl.xlabel(Xlabel) pl.savefig(test.eps) gives me an unpleasant outfile with the backends GTK, GTKAgg, WXAgg, WX, Agg, GDK and PS. It works fine only with Cairo and GTKCairo. I'm on trunk and Ubuntu 8.04. All backends do fine for png. It's actually pl.xlabel that kills the eps, if it's replaced by pl.title() everything works again. Not sure when this problem appeared, but probably not so long ago. Cheers, Olle -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net 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 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embedding a plot function in existing wxapp GUI, problem replotting
On Tue, Mar 9, 2010 at 1:49 PM, Pribadi, Krishna krishna.prib...@harley-davidson.com wrote: I know it's badly out of date... I'd like to embed it but I'm not quite sure where to begin... Do you think a simple solution like calling it from the system command line will open the plot in a new instance, so that the metadata GUI wont be hung up by the show()? I'd have to pass the selected metadata to a temporary file on disk. It's a bit of a dirty method... Thoughts? I suggest following the embedding_is_wx*.py examples at http://matplotlib.sourceforge.net/examples/user_interfaces/index.html No use of pyplot or show in any of them. JDH -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Making an Axis Label like a legend
Hmm I think I could do this with TextWithDash, but I can't manage to use it... I go: CumGasTxt = fig.text(0.5, 0.5, 'Cumulative Gas (MCF)', withdash=True) and it says AttributeError: Unknown property withdash. I tried changing fig to ax1, but although that doesn't spit out an error, it doesn't display anything. Does anyone know what I'm doing wrong? Thanks a lot, Alex -- View this message in context: http://old.nabble.com/Making-an-Axis-Label-like-a-legend-tp27826934p27841250.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Re move, mask, or hide parts of a polygon?
I've become stuck on what seems to be an easy problem. Can part of a patch or collection be masked or otherwise hidden? I assumed that my_polygon.set_clip_path( patch ) where patch is a patches.Polygon would do the trick. Thanks, -Erik -- View this message in context: http://old.nabble.com/Remove%2C-mask%2C-or-hide-parts-of-a-polygon--tp27842142p27842142.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] grey scale line plots
I need a figure containing color line plots to be changed to grayscale, cycling through line styles instead of colors. How? Thanks, Alan Isaac PSI suppose I searched the web ineffectively on this, but I did try. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] ipython -pylab
Hi All, I am trying to understand exactly what the -pylab option does when I launch ipython -pylab - thought some folks here might know. For example, after executing ipython -pylab I can type either a = np.array([1.,10.]) OR b = array([1.,10.]) are these both numpy arrays? And clearly, there has been an import numpy as np from the -pylab option. Also, how is scipy imported? Just form scipy import * or something similar to numpy? I haven't been able to find this info online or in documents yet. Thanks, Andre -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ipython -pylab
On Tue, Mar 9, 2010 at 6:48 PM, Andre Walker-Loud walksl...@gmail.comwrote: Hi All, I am trying to understand exactly what the -pylab option does when I launch ipython -pylab - thought some folks here might know. For example, after executing ipython -pylab I can type either a = np.array([1.,10.]) OR b = array([1.,10.]) are these both numpy arrays? And clearly, there has been an import numpy as np from the -pylab option. Also, how is scipy imported? Just form scipy import * or something similar to numpy? I haven't been able to find this info online or in documents yet. Thanks, Andre Hi, Look in IPython/Shell.py to see how pylab option is being evaluated. And similarly in matplotlib/lib/matplotlib/pylab.py Also in your ipythonrc file you can unset pylab_import_all option to have a clearer namespace (i.e. the contents of pylab.py will not be explicitly loaded.) And yes those are the same NumPy arrays. You can always check this by type builtin. -- Gökhan -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] grey scale line plots
Here's a skeleton, for a series of lines that get darker and more solid (from past to present, as I use it): from itertools import cycle grey_linestyles = cycle(map(lambda tu: dict(zip(('color','dashes'),tu)),(('0.5',(4,1,1,1)),('0.4',(2,1)), ('0.3',(5,1,2,1)),('0.2',(4,1)),('0.1',(6,1)),('0.0',(10,1)),('0.0', (20,1) class IsotoProfileFigure(Figure): def __init__(self, *args, **kwargs): self.linestyles = grey_linestyles def plot(self, gases, label='_nolegend'): style = self.linestyles.next() #TODO: allow for usual style modifiers passed in self.isoaxis.plot(deltas,self.verts,label=label, **style) On Mar 9, 2010, at 9 Mar, 1:52 PM, Alan G Isaac wrote: I need a figure containing color line plots to be changed to grayscale, cycling through line styles instead of colors. How? Thanks, Alan Isaac PSI suppose I searched the web ineffectively on this, but I did try. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users Chloe Lewis Graduate student, Amundson Lab Ecosystem Sciences 137 Mulford Hall Berkeley, CA 94720-3114 http://nature.berkeley.edu/~chlewis -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Doc suggestion
All, The linebuilder program on: http://matplotlib.sourceforge.net/users/event_handling.html Needs two extra lines, one at the beginning and one at the end. Their absence, particularly the second one, can cause confusion. import matplotlib.pyplot as plt class LineBuilder: def __init__(self, line): self.line = line self.xs = list(line.get_xdata()) self.ys = list(line.get_ydata()) self.cid = line.figure.canvas.mpl_connect('button_press_event', self) def __call__(self, event): print 'click', event if event.inaxes!=self.line.axes: return self.xs.append(event.xdata) self.ys.append(event.ydata) self.line.set_data(self.xs, self.ys) self.line.figure.canvas.draw() fig = plt.figure() ax = fig.add_subplot(111) ax.set_title('click to build line segments') line, = ax.plot([0], [0]) # empty line linebuilder = LineBuilder(line) plt.show() -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error
Hi Jeff, Thank you for looking at the code for me! It works perfect for the first image but when it tries to do the second it errors out saying: lon0 outside of range of lonsin. Any idea why is that happening? Is it happening for you too? Thanks, Anton From: Jeff Whitaker jsw...@fastmail.fm To: antonv vasilescu_an...@yahoo.com Cc: matplotlib-users@lists.sourceforge.net Sent: Mon, March 8, 2010 12:50:48 PM Subject: Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error antonv wrote: Hi Jeff, Here is the whole script: http://old.nabble.com/file/p27826457/_test_shiftgrid.py _test_shiftgrid.py And here are the grib data files: http://socalscubainfo.com/downloads/GRIB2_files.zip Also, if there is not too much to ask, is there a sample anywhere that shows how to use shiftgrid for a mercator projection? If you look at the script, I was initially trying to make the images using the mercator projection (there is a commented basemap function there) but it would display just the data starting from the origin. I was wondering how would I be able to display let's say the whole globe but shift the grid 180 so that great britain would be in the center of the map rather than being cut at the edge. Thanks, Anton Anton: You weren't updating the lons and lats to be consistent with the shifted grid. I changed the lines #z, lons[i] = shiftgrid(180.0, z, lons[i], start=False, cyclic=360.0) #zq, lons_a[i] = shiftgrid(180.0, zq, lons_a[i], start=False, cyclic=360.0) in your script to lons1 = lons[0,:] z, lonsnew = shiftgrid(180.0, z, lons1, start=False) zq, lonsnew = shiftgrid(180.0, zq, lons1, start=False) lons, lonsnew = shiftgrid(180.0, lons, lons1, start=False) lats, lonsnew = shiftgrid(180.0, lats, lons1, start=False) and it works fine. -Jeff Jeff Whitaker wrote: antonv wrote: Hi Jeff, Thanks for the quick reply! I've updated to the latest shiftgrid and now I get the chart :D I still have a small issue as there is a half degree sliver missing from the mapping at the greenwich meridian. Any idea how to solve that issue? Here is an image showing that (above england): http://old.nabble.com/file/p27824785/Global-HTSGW_DIRPW-0.png Thanks, Anton Anton: Looks like the values at the Greenwich meridian got messed up somehow. Can you post your script somewhere so I can try it out? -Jeff Jeff Whitaker wrote: antonv wrote: Hi all, I am getting a 'cyclic point not included' error using shiftgrid on a grib file from NOAA. I've checked and it seems that the file has the lons from 0 to 359.5 every .5 degree but I get that error whenever I try to run this. What I need to achieve is to shift the grid from 0 / 360 to -180 / 180 so that I can create a map over Great Britain. I am using a Cassini projection. Anton: You can add the wraparound, or cyclic point using the addcyclic function. Or, you can update to the latest svn version of basemap which does not have this restriction. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD R/PSD1Email : jeffrey.s.whita...@noaa.gov 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD R/PSD1Email : jeffrey.s.whita...@noaa.gov 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD
Re: [Matplotlib-users] Making an Axis Label like a legend
On Tuesday 09 March 2010 21:10:49 Alex S wrote: Hmm I think I could do this with TextWithDash, but I can't manage to use it... I go: CumGasTxt = fig.text(0.5, 0.5, 'Cumulative Gas (MCF)', withdash=True) and it says AttributeError: Unknown property withdash. I tried changing fig to ax1, but although that doesn't spit out an error, it doesn't display anything. Does anyone know what I'm doing wrong? Thanks a lot, Alex Hi Alex, I cannot see the keyword argument 'withdash' for fig.text, but it does exists for ax.text (with ax being an subplot instance) at least since maplotlib version 0.99. Kind regards, Matthias -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users