Hi Jeff,

On Friday 06 July 2007 18:28, Jeff Whitaker wrote:
> Jesper:  Hmm, I guess I never thought anyone would make a map that small. 
> I tweaked some of the parameters to make it work better (svn revision
> 3470).  Here's the diff in case you just want to apply the patch manually:

Thanks for the patch. And apparantly you were right until now;-) In any case I 
would guess that at some point basemap would need to be changed.

In shelf sea modelling we are now making setups with horizontal resolutions of 
down to the order of hundreds of meters and global ocean models are not far 
from this resolution either:

https://www.navo.navy.mil/nipr_2006/modeling.html

I am not entirely up to date with meteorological models but at least I know of 
one limited area model that I use which has a resolution of 5 km.

> This will make drawing of meridians and parallels slower, however.

What about making the resolution dependent on the size of the map if this is a 
problem? I have a small method that I am using for creating nice contour 
levels - although smarter methods definitely must exist. I have tried to 
adapt it for producing what you need. If you decide to include something like 
this please be aware that the Decimal(str(delta)) should probably be changed 
(I don't think it will handle all cases well). Maybe it is faster simply to 
increase the resolution as you have already done when it becomes necessary:

def _getInterval(minval, maxval, ninter):
  """Returns list which resolves minval to maxval with at least ninter 
intervals."""
  import decimal
  import numpy as npy

  # Calculate interval between increments
  delta = (maxval-minval)/ninter
  n = decimal.Decimal(str(delta)).adjusted()
  delta = 10**n

  # Round off minimum and maximum values
  xmin = minval/10**n
  xmax = maxval/10**n
  xmin = (xmin - xmin % 10)*10**n
  xmax = (xmax + xmax % 10)*10**n

  values = npy.arange(xmin, xmax+delta, delta)
  return values

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to