Basemap with origin within the plot

I am trying to prepare a plot on the UK national grid. This is a transverse mercator projection centred on the UK with a false origin offset from the projection origin (lat_0, lon_0).

The Basemap coordinate system origin (0 Easting and Northing) always seems to be set in the lower-left corner of the plot. The plot I need includes data either side of the origin so I need the origin within the plot area.

Is there a general way of setting the origin somewhere other than the lower-left corner?

I can either get basemap to plot the correct data region, in which case the origin is in the wrong place or I can fool Basemap by adjusting the axes bounds later. However, if I do this some of the coastline isn't plotted because Basemap decides it isn't on the map.

Cheers,
Stephen.

I've just had to deal with a similar problem, you need to use the
basemap.shiftgrid() method to shift the co-ordinate grid accordingly.

Cheers

Adam

···

On 10/10/2007, Pascoe, S (Stephen) <S.Pascoe@...959...> wrote:

Is there a general way of setting the origin somewhere other than the lower-left corner?

Pascoe, S (Stephen) wrote:

I am trying to prepare a plot on the UK national grid. This is a transverse mercator projection centred on the UK with a false origin offset from the projection origin (lat_0, lon_0).

The Basemap coordinate system origin (0 Easting and Northing) always seems to be set in the lower-left corner of the plot. The plot I need includes data either side of the origin so I need the origin within the plot area.

Is there a general way of setting the origin somewhere other than the lower-left corner?

I can either get basemap to plot the correct data region, in which case the origin is in the wrong place or I can fool Basemap by adjusting the axes bounds later. However, if I do this some of the coastline isn't plotted because Basemap decides it isn't on the map.

Cheers,
Stephen.

Stephen: There's no way to change the coordinate system Basemap uses. To get you data to plot in the correct place, just add an offset

xoffset, yoffset = map(lon_0, lat_0)

to the UK national grid coordinates of the data you are plotting.

HTH,

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328