Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0
Bryan Fodness wrote: > I just upgraded to 0.98.0 and recreated a few graphs. I am missing > parts of the edges of a fill and polygon. Any suggestions? > Please post an illustrative script, as simple as possible. Eric - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] missing lines on graph with upgrade to 0.98.0
I just upgraded to 0.98.0 and recreated a few graphs. I am missing parts of the edges of a fill and polygon. Any suggestions? -- "The game of science can accurately be described as a never-ending insult to human intelligence." - João Magueijo <>- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] trying to change the number of elements in array while preserving data
Bryan Fodness wrote: > I tried posting this to numpy, but my posts never show up. odd -- it works fine for me -- are you subscribed? anyway: >>> import numpy as np >>> a = np.arange(100).reshape((10,10)) >>> b = np.ones((5,7)) * 30 >>> a array([[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39], [40, 41, 42, 43, 44, 45, 46, 47, 48, 49], [50, 51, 52, 53, 54, 55, 56, 57, 58, 59], [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], [70, 71, 72, 73, 74, 75, 76, 77, 78, 79], [80, 81, 82, 83, 84, 85, 86, 87, 88, 89], [90, 91, 92, 93, 94, 95, 96, 97, 98, 99]]) >>> b array([[ 30., 30., 30., 30., 30., 30., 30.], [ 30., 30., 30., 30., 30., 30., 30.], [ 30., 30., 30., 30., 30., 30., 30.], [ 30., 30., 30., 30., 30., 30., 30.], [ 30., 30., 30., 30., 30., 30., 30.]]) >>> a[3:8, 2:9] += b >>> a array([[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [ 30, 31, 62, 63, 64, 65, 66, 67, 68, 39], [ 40, 41, 72, 73, 74, 75, 76, 77, 78, 49], [ 50, 51, 82, 83, 84, 85, 86, 87, 88, 59], [ 60, 61, 92, 93, 94, 95, 96, 97, 98, 69], [ 70, 71, 102, 103, 104, 105, 106, 107, 108, 79], [ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89], [ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]]) >>> -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] trying to change the number of elements in array while preserving data
I tried posting this to numpy, but my posts never show up. So, I was hoping someone here might be able to help me. I have two arrays that are different sizes and i would like to be able to add them for plotting. If I have an array a and b, [[1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9] [1 2 3 4 5 6 7 8 9]] [[0 0 0 0 0] [0 3 3 3 0] [0 3 3 3 0] [0 3 3 3 0] [0 0 0 0 0]] but I would like to change b to look like this, [[0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0] [0 0 3 3 3 3 3 0 0] [0 0 3 3 3 3 3 0 0] [0 0 3 3 3 3 3 0 0] [0 0 3 3 3 3 3 0 0] [0 0 3 3 3 3 3 0 0] [0 0 3 3 3 3 3 0 0] [0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0]] so I can get the sum of a and b. My data will not be regular like these. I have a 400x60 array with irregular data that I would like as a 400x400 array. Does anybody know of an easy way to accomplish this? Bryan -- "The game of science can accurately be described as a never-ending insult to human intelligence." - João Magueijo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
My fault. that last error was because I re-installed matplotlib and forgot to "re-change" the backend to TkAgg. Sorry. Everything seems to be working again now (although a bit slower). Kurt - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Looks like your latest compile includes the full-res data. Kurt - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Well, installing the highres data into the 'data' directory didn't help. Kurt - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Update to Matplotlib and Numpy producing error
Jeff, Got it and it seemed to install. Well... as luck would have it, I still have a problem. I think I know what is causing it, though. I was using the high-res data, and the "upgrade" nukes that data. Here's the message I'm getting along with the code snippet, just to make sure I'm on the right track for a solution: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\Lib\lib-tk\Tkinter.py", line 1403, in __call__ return self.func(*args) File "C:\Documents and Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py", line 405, in callback populate_banddata(fileToOpen) File "C:\Documents and Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py", line 383, in populate_banddata populate_location_map(sheetnumber, sP, txInfo) File "C:\Documents and Settings\kpeters\smworkspace\parsesmExcelFile\src\readParse\ExcelClass.py", line 100, in populate_location_map projection='lcc', lat_1=33, lat_2=45, lon_0=-95, resolution='l') TypeError: 'module' object is not callable Code Snippet: m1 = basemap(llcrnrlon=-119, llcrnrlat=22, urcrnrlon=-64, urcrnrlat=49, \ projection='lcc', lat_1=33, lat_2=45, lon_0=-95, resolution='l') shp_info = m1.readshapefile(r'C:\Python25\Lib\basemap-0.99\examples\citiesx020', 'states', drawbounds=True) Any hints on what to do now that I am downloading the fullres? Regards, Kurt - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot edge or border
HI , thank you very much for the quick reply, i have an older version (which is not up to me upgrade) so the subplots_adjust worked just fine. Thanks again. bye for now Margherita - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot edge or border
Hi Margherita, On Wednesday 04 June 2008 18:01:47 Margherita Vittone wiersma wrote: > Hi all, > i have a plot on which the x axix has timestamps info; i would like to > control the size of the edge or border (not sure whta is the proper word) > so the there is enough space between the real plot and the outer border so > that the x labels are not cut out. I rotate the xlabel also but still i > don't have enough space; how do i control that feature? Even in one of the > demo examples i see the same problem, example in date_demo_convert.py > where you can't see the x full lable. First of all I cannot confirm your observation with the online version of the example at http://matplotlib.sourceforge.net/examples/pylab/date_demo_convert.py Maybe the function "fig.autofmt_xdate" is not included in your version of the example. With that function you have many possibilities to change the x-date-format, e.g. fig.autofmt_xdate(bottom=0.3, rotation=45) or you can extend the space between the axes and the border of the figure yourself using subplots_adjust(bottom=0.2) best regards Matthias - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot edge or border
On Wed, Jun 4, 2008 at 11:01 AM, Margherita Vittone wiersma <[EMAIL PROTECTED]> wrote: > Hi all, > i have a plot on which the x axix has timestamps info; i would like to > control the size > of the edge or border (not sure whta is the proper word) so the there is > enough space between > the real plot and the outer border so that the x labels are not cut out. I > rotate the xlabel also > but still i don't have enough space; how do i control that feature? Even in > one of the demo examples > i see the same problem, example in date_demo_convert.py where you can't see > the x full lable. What you are asking for is controlled by the "subplots_adjust" parameter fig.subplots_adjust(bottom=0.2) but for dates in particular we have a helper function which: * adjusts the bottom * rotates the ticks * right aligns them Try fig.autofmt_xdate() with recent matplotlib releases. JD - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plot edge or border
Hi all, i have a plot on which the x axix has timestamps info; i would like to control the size of the edge or border (not sure whta is the proper word) so the there is enough space between the real plot and the outer border so that the x labels are not cut out. I rotate the xlabel also but still i don't have enough space; how do i control that feature? Even in one of the demo examples i see the same problem, example in date_demo_convert.py where you can't see the x full lable. Thank all you much Margherita - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend for a scatter plot based on symbols
Hi, Thanks for the tips, I'll try that :) Matthieu 2008/6/4 Matthias Michler <[EMAIL PROTECTED]>: > Hi Matthieu, > > I'm not sure if somebody else already answered to your question and I don't > know the best way to achieve what you need, but I suggest the following > work-around: > > scatter(x, x**2.4, marker='s', color='r', s=25, label="_") > # with no label > > plot([0], [0], ls='', marker='s', color='r', ms=5, mew=0, label="my label") > # plot somewhere outside the shown axis with the preferred label > > legend() > > Best regards > Matthias > > On Friday 30 May 2008 11:20:08 Matthieu Brucher wrote: > > Hi, > > > > I'd like to plot three scatter plots on the same figure, each with > > different symbols. Associated to these scatter plots, I'd like to put a > > legend. For the moment, the legend is based on one of the color of the > > associated scatter plot, but it is not relevant. Indeed, the colors are > not > > identical inside one scatter plot, so the displayed color is > > discriminating. So I'd like to display the symbol (circle, square, cross, > > ...) instead of the color rectangle. Is it possible ? > > > > Thanks, > > > > Matthieu > > > > - > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend for a scatter plot based on symbols
Hi Matthieu, I'm not sure if somebody else already answered to your question and I don't know the best way to achieve what you need, but I suggest the following work-around: scatter(x, x**2.4, marker='s', color='r', s=25, label="_") # with no label plot([0], [0], ls='', marker='s', color='r', ms=5, mew=0, label="my label") # plot somewhere outside the shown axis with the preferred label legend() Best regards Matthias On Friday 30 May 2008 11:20:08 Matthieu Brucher wrote: > Hi, > > I'd like to plot three scatter plots on the same figure, each with > different symbols. Associated to these scatter plots, I'd like to put a > legend. For the moment, the legend is based on one of the color of the > associated scatter plot, but it is not relevant. Indeed, the colors are not > identical inside one scatter plot, so the displayed color is > discriminating. So I'd like to display the symbol (circle, square, cross, > ...) instead of the color rectangle. Is it possible ? > > Thanks, > > Matthieu - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users