Re: [Matplotlib-users] Integer equal-width bins for histograms

2014-05-30 Thread Yoshi Rokuko
Am Thu, 29 May 2014 14:14:52 -0700 schrieb Antony Lee : > Hi, > When histogramming integer data, is there an easy way to tell > matplotlib that I want a certain number of bins, and each bin to > cover an equal number of integers (except possibly the last one)? > (in order to avoid having some bins

[Matplotlib-users] Basemap.drawgreatcircle() map border

2013-11-11 Thread Yoshi Rokuko
Hey, I know that you're not supposed to draw a greatcircle with Basemaps drawgreatcircle() when it will hit the border of the map. But I think it works pretty well except for the attempt to connect the line (see horizontal lines in [1]). Is there a way to not get these horizontal lines? Does some

Re: [Matplotlib-users] streamplots in axesgrid

2013-10-07 Thread Yoshi Rokuko
Sun, 6 Oct 2013 15:41:07 -0500 Tony Yu : > The return value for streamplot is a bit hacked together. Its just a > simple object containing a line collection and an arrow collection. > Instead of passing the set of collections, just pass one of the > collections to the colorbar. For example: > >

[Matplotlib-users] streamplots in axesgrid

2013-09-26 Thread Yoshi Rokuko
Hey, I'm trying to plot streamplots into an axesgrid object with something like: fig = pl.figure(1, (13, 20)) grid = AxesGrid(fig, 111, nrows_ncols = (3, 2), axes_pad = 0.6, cbar_location = 'top', cbar_mode = 'each',

Re: [Matplotlib-users] EPS backend

2013-06-07 Thread Yoshi Rokuko
Fr, 7 Jun 2013 10:13:26 -0400 Michael Droettboom : > Have you tried setting ps.usedistiller to False, or xpdf? There have > been problems using Ghostscript as a distiller with recent versions > of Ghostscript. No, I didn't try. Thanks for the hint, I will test that. > We'll need a minimal exa

[Matplotlib-users] EPS backend

2013-06-07 Thread Yoshi Rokuko
I'm having problems recently with printing EPS figures created by matplotlib. To me this is strange because printing postscript should just work in my opinion. My most recent example is a Basemap thing with AxesGrid. Basically the idea was to have six maps nicely arranged on a DIN A4 paper for pri

Re: [Matplotlib-users] plot_date with multiple subplots

2011-11-30 Thread Yoshi Rokuko
i use something like that: from datetime import datetime, timedelta import matplotlib.pyplot as pl import matplotlib.ticker as ticker import matplotlib.dates as mdates dates1 = [datetime(2005,5,11)+n*timedelta(days=1) for n in range(500)] dates2 = [datetime(... ax1 = pl.subplot(2,1,1) ax1.plot(d

[Matplotlib-users] contourf cmap.set_under

2011-11-17 Thread Yoshi Rokuko
following the example [1] i can't get the colorbar extend colors to show properly. here is what i did: import matplotlib.pyplot as plt import matplotlib.cm as cm levels = np.linspace(.01,.69,10) <...> im = plt.contourf(x, y, z, levels, extend='both', cmap=cm.BuPu) im.cmap.set_under('yellow') im.c

Re: [Matplotlib-users] axes_grid1 and colorbar ticks

2011-11-16 Thread Yoshi Rokuko
+--- Jae-Joon Lee ---+ > This seems to be a bug that need to be fixed. > Meanwhile, use "locator" parameter as below. > > cbar = grid.cbar_axes[0].colorbar(im, locator=ticks) that works, thank you! best regards, yoshi -

[Matplotlib-users] axes_grid1 and colorbar ticks

2011-11-16 Thread Yoshi Rokuko
does someone knows how to specify ticks for a colorbar inside axesgrid? the following does not work as expected: from mpl_toolkits.axes_grid1 import AxesGrid ticks = [.01, .25, .5, .75, .99] grid = AxesGrid() [...] grid.cbar_axes[i].colorbar(im, ticks=ticks) i'm thankfull for any pointers, yoshi

Re: [Matplotlib-users] Basemap AxesGrid

2011-11-14 Thread Yoshi Rokuko
> grid = AxesGrid(fig, 132, > nrows_ncols = (3, 2), > axes_pad = 0.1, > cbar_location = "top", > cbar_mode="single", >) solved by using: grid = AxesGrid(fig, 111, ...) best regards, yoshi --

Re: [Matplotlib-users] Basemap AxesGrid

2011-11-08 Thread Yoshi Rokuko
+- Yoshi Rokuko ---+ > this works in principle, but however i can't increase > the size of the grid. > > even if i try something like: > > fig = plt.figure(1, (15,18)) > fig.subplots_adjust(left=0.01, bottom=0.01, >

Re: [Matplotlib-users] Basemap AxesGrid

2011-11-08 Thread Yoshi Rokuko
+-- Benjamin Root ---+ > Why not something like this: > > fig = plt.figure() > grid = AxesGrid(...) > bm = Basemap(...) > for ax in grid : > x, y = bm(lon, lat) > ax.scatter(x, y, vmin=globalmin, vmax=globalmax) > > I do variations of this all the time. Th

Re: [Matplotlib-users] Basemap AxesGrid

2011-11-07 Thread Yoshi Rokuko
> is there a way for using Basemap with AxisGrid? > > did someone try something like: > > grid = AxisGrid() > for i in range(4): > grid[i].scatter(with underlying Basemap) the common thing is probably something like: fig = pl.figure() for i in range(4): fig.add_subplot(2,2,i) bm = B

[Matplotlib-users] Basemap AxesGrid

2011-11-07 Thread Yoshi Rokuko
is there a way for using Basemap with AxisGrid? did someone try something like: grid = AxisGrid() for i in range(4): grid[i].scatter(with underlying Basemap) ? thank you and best regards, yoshi -- RSA(R) Conference

Re: [Matplotlib-users] [Basemap] savefig bbox_inches=tight

2011-10-27 Thread Yoshi Rokuko
+--- Jeff Whitaker ---+ > You can use the pad_inches keyword to adjust the amount of space left > around the map. > <...> > plt.savefig('bboxtight.png', bbox_inches='tight',pad_inches=0.45) yes that works fine (0.5 inches in my case). thank you.

[Matplotlib-users] [Basemap] savefig bbox_inches=tight

2011-10-27 Thread Yoshi Rokuko
if one saves a Basemap plot with savefig option bbox_inches='tight' geographical coordinates are cut: bmap = Basemap(...) bmap.drawparallels([those,numbers,are,gone], labels=[1,0,0,0]) bmap.drawmeridians([those,numbers,are,gone], labels=[0,0,0,1]) plt.contourf

Re: [Matplotlib-users] Creating a new colormap based on a cmap from matplotlib.cm?

2011-10-14 Thread Yoshi Rokuko
+ Keith Hughitt -+ > Hi all, > > Does anyone know of a good way to create a new LinearSegmentedColormap > based off an existing one? > > I have a function which attempts to generate N "optimal" color map > indices for a given data array. In

Re: [Matplotlib-users] Ordering contourf within a range

2011-08-12 Thread Yoshi Rokuko
you mean something like that? m.contourf(x, y, var, np.linspace(-100,100,33)) best regards -- FREE DOWNLOAD - uberSVN with Social Coding for Subversion. Subversion made easy with a complete admin console. Easy to use, e

Re: [Matplotlib-users] [Basemap] contour plot just inside country

2011-07-23 Thread Yoshi Rokuko
+- Jeff Whitaker ---+ > > Here's the basic idea: > > 1) read the germany.dat file, use it to create a _geoslib Poly instance, > i.e. > > from mpl_toolkits.basemap import _geoslib > b = np.asarray([lons,lats]).T # lons and lats are lists. > germany

Re: [Matplotlib-users] 1d heat map

2011-07-21 Thread Yoshi Rokuko
what are you using right now, something like that? >>> a = np.random.random(70) >>> x = np.empty([10,a.shape[0]]) >>> x[:,:] = a >>> pl.contourf(x) you might want to suppress ticks on the y-axis. best regards, yoshi --

Re: [Matplotlib-users] [Basemap] contour plot just inside country

2011-07-15 Thread Yoshi Rokuko
+- Jeff Whitaker ---+ > On 7/14/11 2:25 PM, Yoshi Rokuko wrote: > > hi, is it possible to restrict a contour plot to a > > country? if i grid my data to projection coordinates > > and then make a contour plot i can draw the c

[Matplotlib-users] [Basemap] contour plot just inside country

2011-07-14 Thread Yoshi Rokuko
hi, is it possible to restrict a contour plot to a country? if i grid my data to projection coordinates and then make a contour plot i can draw the country borders on top, but since the data plotted outside the country is a gridding artifact i would rather not plot it. to make it more clear what i