I have trouble with matplotlib / pyplot / basemap. I plot contour lines (air
pressure) on a map. I use clabel to show the value of the contour lines. But
the problem: the padding between the value and the contour line is too much.
I have found the parameter "inline_spacing", which i have set to zero. But
there is still to much free space. Any ideas?
Your code wans't included, but try setting your x and y limits *before* the call to clabel. I think that the problem is that clabel makes a space in the contours according to how large your font is, but if you then resize the plot (zoom in) then the blank space is too large for the labels.
Cheers, Jody
···
On Dec 4, 2014, at 17:47 PM, Sappy85 <robert.wittkopf@...380...> wrote:
I have trouble with matplotlib / pyplot / basemap. I plot contour lines (air
pressure) on a map. I use clabel to show the value of the contour lines. But
the problem: the padding between the value and the contour line is too much.
I have found the parameter "inline_spacing", which i have set to zero. But
there is still to much free space. Any ideas?
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options
Hi @all,
the problem seems to be solved. Thanks Jody!
What i have done:
1.) check out the xlim and ylim after clabel call
*xmin, xmax = plt.xlim() # return the current xlim
ymin, ymax = plt.ylim() # return the current ylim
print xmin,xmax
print ymin,ymax*
2.) use and set these limits before clabel call:
*plt.xlim(0.0,6475051.47849)
plt.ylim(0.0,4412688.31468)*
Yes, that's it. Very confusing! I do not understand why that only goes so
awkward?
Not sure, as I don't use basemap too often, but I bet calling:
m.drawmapboundary(fill_color='w')
before clabel would do the trick
Cheers, Jody
···
On Dec 9, 2014, at 16:35 PM, Sappy85 <robert.wittkopf@...380...> wrote:
Hi @all,
the problem seems to be solved. Thanks Jody!
What i have done:
1.) check out the xlim and ylim after clabel call
*xmin, xmax = plt.xlim() # return the current xlim
ymin, ymax = plt.ylim() # return the current ylim
print xmin,xmax
print ymin,ymax*
2.) use and set these limits before clabel call:
*plt.xlim(0.0,6475051.47849)
plt.ylim(0.0,4412688.31468)*
Yes, that's it. Very confusing! I do not understand why that only goes so
awkward?
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options