Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-29 Thread klo uo
IMHO that's the most straightforward approach. He can use masked array for empty blocks (if contour data doesn't already contain the holes as masked array) and apply inpainting, then draw the land. For more details about inpainting: http://stackoverflow.com/a/17125125/992005 On Wed, Jan 29, 2014

Re: [Matplotlib-users] plot axis and legend without anti-aliased lines

2013-06-29 Thread klo uo
Thanks Paul, that solved the problem. matplotlib.rcParams['axes.linewidth'] = 0.5 matplotlib.rcParams['patch.linewidth'] = 0.5 is what I wanted and I'll put that in matplotlibrc. Previously I thought that this is related to some anti-aliasing setting that would affect all lines drawn. Bu

[Matplotlib-users] plot axis and legend without anti-aliased lines

2013-06-29 Thread klo uo
This code: import matplotlib.pyplot as plt plt.plot([1,2,5,3,4], label='line') plt.legend() plt.show() shows this image: http://i.imgur.com/KMPywSp.png I want axis and legend box with 1px line, like this: http://i

Re: [Matplotlib-users] Font issue while trying to save PS/EPS/SVG but not PDF

2013-05-28 Thread klo uo
On Tue, May 28, 2013 at 4:40 PM, Michael Droettboom wrote: > Which version of Windows are you on? Apparently, the Segoe UI font is > different on Windows 7 and 8 and I'd like to download and test with the > correct one. I'm on Windows XP, but problem was with the name of the font. This font's name

[Matplotlib-users] Font issue while trying to save PS/EPS/SVG but not PDF

2013-05-28 Thread klo uo
As suggested by Phil, I'm reposting github issue #2067 on this list. I use MPL 1.2.1 on Windows with Python 2.7.5. In my matplotlibrc I've set sans-serif font to "Segoe UI". Now, if I try to save a plot to PDF, MPL saves it fine, but if I try PS or EPS or SVG it fails, because of the font set. (I

[Matplotlib-users] Fwd: 'module' object has no attribute 'instancemethod'

2013-05-25 Thread klo uo
Ah, right. There was indeed new.pyc file in folder I was working in. Thanks On Sat, May 25, 2013 at 9:47 PM, Christoph Gohlke wrote: > On 5/25/2013 12:37 PM, klo uo wrote: > > Out of the blue, I started getting this messages while plotting with MPL

[Matplotlib-users] 'module' object has no attribute 'instancemethod'

2013-05-25 Thread klo uo
Out of the blue, I started getting this messages while plotting with MPL 1.2.1: Traceback (most recent call last): File "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4.py", line 244, in mouseMoveEvent FigureCanvasBase.motion_notify_even

Re: [Matplotlib-users] ANN: matplotlib 1.2.0

2012-11-08 Thread klo uo
Congratulation, team! Binary installer for 32-bit Windows, built using python.org's 2.7 and Numpy 1.6.2 is listed but file is not found. I guess it's boiling now, and will be available soon ;) On Fri, Nov 9, 2012 at 1:57 AM, Michael Droettboom wrote: > After months of hard work by a veritable

Re: [Matplotlib-users] colormap shift

2012-11-05 Thread klo uo
I asked same question with different problem here: http://matplotlib.1069221.n5.nabble.com/How-to-shift-colormap-td18451.html You can see there how to use Gimp and create mpl colormap and then later there is nifty code that will allow you to shift colormaps with a slider >From your problem I assu

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-13 Thread klo uo
nd avoid reprojection in python would be to: > 1. do the WMS GetCapabilities request to find the available supported > Coordinate Reference Systems (which will vary with WMS server) > 2. setup Basemap to use one of these CRS > 3. use the bounding box of your current axis (in projection

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
I guess that's it? warpimage() as it is now, checks if passed image is url, so we can add additional check if image is url, with urlparse to deduce image coordinates and projection if present, then overlay it over already created Basemap object.

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
On Thu, Oct 11, 2012 at 4:40 AM, klo uo wrote: > Not sure, but as in example posted, 'img' is HTTPmessage pointing to > server, and I can't see how we can deduce georeference as 'wms' object is > named arbitrary, it could have been named to anything: > What a

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
On Thu, Oct 11, 2012 at 3:31 AM, Jeff Whitaker wrote: > But warpimage assumes the image is of global extent - perhaps we could > make warpimage smart enough to get the georeferencing from the wms > instance but that would require some work. There must be some way to > let the WMS server do the ima

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
On Wed, Oct 10, 2012 at 11:28 PM, Jeff Whitaker wrote: > > I wonder whether it would be better to use OWSlib > (http://geopython.github.com/OWSLib/) for OGS/WMS support, instead of trying > to roll our own solution. It only has ElementTree as a dependency. Klo - > would you be interested in re

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
Hi Rich, On Tue, Oct 9, 2012 at 10:38 PM, Rich Signell wrote: > It look like there was a "wmsimage" method in Basemap that was folded > into a "arcgisimage" method? > > IIRC, it was named like that in the test cycle, then renamed correctly to arcgis I made my first step in adding WMS method: htt

Re: [Matplotlib-users] Building Basemap on Windows

2012-08-30 Thread klo uo
On Thu, Aug 30, 2012 at 5:44 PM, Christoph Gohlke wrote: > > Try to remove 'geos_c' from the list of libraries in setup.py. Works for me. > > -libraries=['geos_c','geos'])) > +libraries=['geos'])) Thanks, that was it. It builds fine a

[Matplotlib-users] Building Basemap on Windows

2012-08-30 Thread klo uo
So I forked then cloned huge Basemap repository with idea to test latest code README file says it needs geos library, which README suggest: nmake /f makefile.vc MSVC_VER=1500 However, error is inevitable almost always and this time Google suggests that MS does not support C-99 (can't find intt

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread klo uo
Jeff, I just thought to mention this: function name "wmsmap" maybe should be changed to "restmap" as for WMS servers will need to do another template. Here is example urllib call for sample WMS function GetMap: basemap_url = "\ http://geonetwork3.fao.org/ow

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread klo uo
>> Jeff it looks great, everything is parametrized including server name >> and map name, so it should work for any additional service. >> However on Windows with Python 2.7 and Basemap 1.0.5 I get an error >> while trying to run the script: > > > Klo: Just added a pull request for this > > https:

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread klo uo
On Mon, Aug 27, 2012 at 9:32 PM, Jeff Whitaker wrote: > > Klo: Yes. And vice versa, some of those 4500 projections aren't supported > by Basemap. > > Anyway, I went ahead and created a prototype 'wmsmap' method. You can try it > by cloning my fork (https://github.com/jswhit/basemap) and running >

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-27 Thread klo uo
On Mon, Aug 27, 2012 at 2:34 PM, Jeff Whitaker wrote: > Klo: WMS servers use EPSG codes to define map projections - Basemap uses a > set of kwargs. We need some way of inferring epsg codes from the Basemap > kwargs. Alternatively, we could extend Basemap so it can accept EPSG codes. > But, there

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread klo uo
On Sun, Aug 26, 2012 at 9:56 PM, Jeff Whitaker wrote: > Klo: Since epsg codes comprise a very small subset of possible Basemap > projections, it may be better to just allow Basemap to accept an epsg kwarg. > That keyword would be required in order to use a WMS to display a map > background. This m

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread klo uo
> As said later today I'll look at Nokia maps and then will try to look > for WMS servers. Nokia map services are OK, and can be used even without applying for free account, but they brand every map with their logo even for professional licence. REST services (http://api.maps.nokia.com/en/restmaps

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread klo uo
On Sun, Aug 26, 2012 at 12:18 AM, Jeff Whitaker wrote: > Klo: The image in interpolated to the Basemap projection region. This is > slow - the main reason to use the WMS is to avoid this by having it done on > the server side. All right, that's the right way anyway > The trick is to figure out

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
Well it seems ArcGIS web-services can't be bitten in public place. Google and Bing static maps have many limitations: - require account for providing key - draw logos on image - limited size: Bing basic account can return max 900x834 and Google 1280x1280 (while ArcGIS 2048x2048) - Google stati

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
>> Result with coastlines overlay attached! > > Here is attachment Hm, image needs to be approved by moderator... Here is a link to it: http://i.imgur.com/1ZMoU.png -- Live Security Virtual Conference Exclusive live even

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
> Export Map (http://atlas.resources.ca.gov/arcgis/SDK/REST/export.html) > seems like only function needed, but more knowledge about Basemap is > needed, as my main problem with it is fitting projections right. I > tried to overlay arcgis map over some Basemap projections like: > > m=Basemap(...)

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
On Sat, Aug 25, 2012 at 5:50 PM, Jeff Whitaker wrote: > > Maybe such a thing could be built using owslib? > > http://geopython.github.com/OWSLib/ This is interesting. I didn't know about this module Using either simple REST (urllib) to access webservices or depend on additional module which expos

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
On Sat, Aug 25, 2012 at 5:57 PM, Jeff Whitaker wrote: > > tilecache.org looks relevant too. > This is like more advanced, on a higher level. I imagine if you plan to add some interaction to Basemap, it would be fantastic, to say at least. While reading Google patent you linked the other day, I ca

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
On Sat, Aug 25, 2012 at 3:24 PM, Jeff Whitaker wrote: > It looks like you are fetching an image over a specified region and > displaying it with matplotlib. That's very useful, but it doesn't solve > the zooming problem you mentioned. Still, it's a good start and would > be nice to have in basema

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-24 Thread klo uo
On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote: > > Oh sure, it's simple! > > http://www.google.com/patents?id=J4YOEBAJ&dq=6618053 Hi Jeff, thanks for your reply. I was hoping to get response if there are ideas how this unfortunate performance can be avoided. If there are some thoughts

[Matplotlib-users] Background basemaps in Basemap

2012-08-24 Thread klo uo
I wanted to overlay some plot over map, and thought to use one of provided background maps that come with Basemap Result isn't that great as expected: loading bluemarble map took 1GB memory, and zooming i.e. Europe region on 1920x1080 screen is too blurred w/o details. As a consequence, using custo

Re: [Matplotlib-users] Possible to change MPL color scheme?

2012-07-22 Thread klo uo
Thanks for your reply Ben, On Sun, Jul 22, 2012 at 4:39 PM, Benjamin Root wrote: > As for the assertion that HTML colors aren't used, that is incorrect. The > named colors follow the HTML list. Here is our list: > > https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/colors.py#L

Re: [Matplotlib-users] Fwd: Possible to change MPL color scheme?

2012-07-21 Thread klo uo
Ah all right, thanks for the tips :) I somehow missed that setting while browsing matplotlibrc Cheers On Sat, Jul 21, 2012 at 9:33 PM, Felix Patzelt wrote: > You want this? > > > > import matplotlib as mpl > mpl.rcParams['axes.color_cycle'] = ['#FF', '#00FF00', '#FF', > '#00',

[Matplotlib-users] Fwd: Possible to change MPL color scheme?

2012-07-21 Thread klo uo
On Sat, Jul 21, 2012 at 7:37 PM, Felix Patzelt wrote: > Have you ever been in a talk where someone uses 100% green on a slide? The > result is usually that no one can see what is shown unless it is a really > large green area. No, but I would have expected in that case appropriate bg. I've seen

[Matplotlib-users] Possible to change MPL color scheme?

2012-07-21 Thread klo uo
Hi, I read previous mail about "colormaps" which reminded me to a question I had about MPL colors. Colors in MPL plots are dark, and pale, and not is some specific color theme but it's just pale dark. I thought that usually people make plots brighter (as more attractive ;) ) If you can, have a lo

Re: [Matplotlib-users] Export 3D plot to 3D file format

2012-04-06 Thread klo uo
On Thu, Apr 5, 2012 at 3:53 AM, Benjamin Root wrote: > > With the way matplotlib is designed and structured, it may be a while > before that would be possible. It wouldn't be impossible, mind you, but I > just haven't thought about that. Could you file a wishlist item on > Github? Maybe I coul

Re: [Matplotlib-users] Export 3D plot to 3D file format

2012-03-27 Thread klo uo
Ah mayavi... I find it complicated for building, and in Ubuntu repository (or launchpad) there is some old version I'll try later today to build it Thanks for your suggestion, Cheers On Tue, Mar 27, 2012 at 11:25 PM, Frédéric Vogt wrote: > Is the savefig function what you're looking for ? > > h

[Matplotlib-users] Export 3D plot to 3D file format

2012-03-26 Thread klo uo
Does someone maybe knows of a project that allows exporting MPL 3D plot (mpl_toolkits.mplot3d.Axes3D) to 3D file format, like OBJ, 3DS, BLEND ... any kind? -- This SF email is sponsosred by: Try Windows Azure free for 90 da

Re: [Matplotlib-users] Why are bars, errorbars... clipped

2012-03-18 Thread klo uo
After parsing matplotlibrc, I browsed module where errorbars are defined (axes.py) and tried changing various variables without success. In bar() function (line 4628) there is "adjust_xlim = False" line which calls line 4768 if set True. So I set it True, to find it's buggy if x starts from 0 (mos

Re: [Matplotlib-users] Why are bars, errorbars... clipped

2012-03-18 Thread klo uo
On Sun, Mar 18, 2012 at 1:50 PM, Angus McMorland wrote: > > For inline ipython, you want to switch to the object-oriented use of > pylab. Something like this should work with xlim. > > a = [0.1, 0.2, 0.1] > fig = plt.figure() > ax = fig.add_subplot(111) > ax.errorbar(arange(3), a, yerr=a-sum(a)/l

Re: [Matplotlib-users] Why are bars, errorbars... clipped

2012-03-18 Thread klo uo
On Sun, Mar 18, 2012 at 1:07 PM, Angus McMorland wrote: > > > The xlim command can be used to set the x limits. For example: > > xlim(-.5, 2.5) > > will prevent the points lying on the axis boundaries for your case. > > Thanks Angus, that worked with ease for separate MPL window, but not inline

[Matplotlib-users] Why are bars, errorbars... clipped

2012-03-18 Thread klo uo
Assuming IPython in pylab mode: a = [0.1, 0.2, 0.1] errorbar(arange(3), a, yerr=a-sum(a)/len(a), fmt='ro') Result MPL output clips limit values in two different ways: 1. If GTK backend is used both left and right sides are clipped 2. If IPyhton inline mode is used, only right side is cli

[Matplotlib-users] How to tell savefig() image size in pixels

2012-01-14 Thread klo uo
I browsed Google, and found mainly outdated code examples (also on scipy cookbook) then some 2008 posts on StackOverflow where at least I find some trace that matplotlib.figure.Figure has some instruments to change output image size, but it's in combination from inches and dpi set. However I just c

[Matplotlib-users] Exception in Tkinter callback

2012-01-11 Thread klo uo
Matplotlib 1.1.0 on Ubuntu 11.04 If MPL backand is set to TkAgg, drawing window dialog appears without plot content, and then after closing it, this error is thrown: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.

[Matplotlib-users] UserWarning: Module dateutil was already imported

2011-12-30 Thread klo uo
>>> from mpl_toolkits.basemap import Basemap /usr/local/lib/python2.7/dist-packages/mpl_toolkits/__init__.py:2: UserWarning: Module dateutil was already imported from /usr/local/lib/python2.7/dist-packages/dateutil/__init__.pyc, but /usr/lib/pymodules/python2.7 is being added to sys.path __impor

Re: [Matplotlib-users] Today's XKCD

2011-11-17 Thread klo uo
I first opened GMail instead Google Reader and you show it to me first :D I don't know half of those projection but I guess I would choose Plate Cartee :D Cheers On Mon, Nov 14, 2011 at 3:28 PM, Michael Droettboom wrote: > Sorry for the slightly OT post, but I thought all of the basemap-using >

Re: [Matplotlib-users] Visualizing data for scientists and engineers

2011-11-15 Thread klo uo
It's same problem for which I asked assistance here: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg22520.html There, Johann provided nifty script with slider, with which help user can shift colormap and get more "meaningful" image Also speaking about great Basemap package,

[Matplotlib-users] pcolor - color values argument

2011-11-15 Thread klo uo
Quote: matplotlib.pyplot.pcolor(*args, **kwargs) Create a pseudocolor plot of a 2-D array. C is the array of color values. I tried to see how can I map custom color values to example array, but seems hard to understand. I

Re: [Matplotlib-users] MODIS data and true-color plotting

2011-11-13 Thread klo uo
I think that paths needed to be passed to CPP/LDFLAGS like this: CPPFLAGS=-I/usr/include/hdf LDFLAGS=-L/usr/lib ./configure --enable-hdf4 && make then also package is dependent on latest hdf5 to be build (1.8.7), so installing it globally would break possible dependencies in any packaging system,

Re: [Matplotlib-users] How to shift colormap?

2011-11-11 Thread klo uo
Thanks Johann, that is exactly what I asked for I knew that matplotlib can do GUI tricks but I didn't felt skilled to go there. Seeing you code it seems easy now, but it's always like that after you see the solution :D Cheers On Fri, Nov 11, 2011 at 6:05 PM, johanngoetz wrote: > > I have thi

Re: [Matplotlib-users] How to shift colormap?

2011-11-11 Thread klo uo
Or are matplotlib colormaps compatible with any other programs? On Fri, Nov 11, 2011 at 4:19 PM, klo uo wrote: > > So I want to ask this question differently: Is there some tool (Inkscape, > CorelDraw, Photoshop, ... anything) that would let me use GUI with some > sliders so th

Re: [Matplotlib-users] How to shift colormap?

2011-11-11 Thread klo uo
Photoshop, ... anything) that would let me use GUI with some sliders so that I can try adjust matplotlib colormap? On Sun, Nov 6, 2011 at 9:58 PM, klo uo wrote: > Like in Basemap examples: > http://matplotlib.github.com/basemap/users/examples.html (topographic > image in the middle o

Re: [Matplotlib-users] Question about Basemap example

2011-11-08 Thread klo uo
OK, soon I found out that m.xmax... are dependant on projection, and I wasn't using Lambert projection For default projection result are degrees and this way meters it sems On Tue, Nov 8, 2011 at 9:13 PM, klo uo wrote: > from http://matplotlib.github.com/basemap/users/examp

[Matplotlib-users] Question about Basemap example

2011-11-08 Thread klo uo
from http://matplotlib.github.com/basemap/users/examples.html: from mpl_toolkits.basemap import Basemap, shiftgrid, cm import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset # read in etopo5 topography/bathymetry. etopodata =\ Datas

[Matplotlib-users] How to shift colormap?

2011-11-06 Thread klo uo
Like in Basemap examples: http://matplotlib.github.com/basemap/users/examples.html (topographic image in the middle of page) ground 0 has some yellow/orange color making seas and oceans coasts in that same, color instead light blue (as we'd all expect I guess) So how to shift this particular color