On Fri, Jan 23, 2009 at 1:08 PM, Pablo Romero <span dir="ltr"><<a href="mailto:romero619@hotmail.com">romero619@hotmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
ok, thank you.<br>
Ive started digging through the galab.py source code, to see how its interfacing the matplotlib/basemap objects,and doing the plotting through matplotlib. </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
question: if I want to avoid using galab, and simply instantiate my own matplotlib basemap object, do I simply need to export a variable from galab and pass it to matplotlib/basemap/contourf? or, do I need to do some sort of translation/interpolation/preparation???<br>
</blockquote><div><br>No, simply export the array:<br><br>ts = ga.expr('ts')<br><br>The "ts" object will be a "GrADSField" object, which is a subclass of a Masked Array class. A masked array has 3 main attributes<br>
<br>ts.data - a numpy numeric array<br>ts.mask - a boolean array of same shape as ts.data which is used for handling undefs.<br>ts.grid - information about the coordinates, dimension environment<br><br>So, ts can be used anywhere you could use a masked array. Some functions may not like a masked array, in which case you can use "ts.data" instead.<br>
<br>Notice that you can use either ga.exp() or ga.expr() with v1.9, but only ga.expr() with v2.0. In principle ga.expr is more flexible, you can get back x-y sections, for example. However, 'expr' is new, let me know if you run into any snags.<br>
<br></div></div> Arlindo<br><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>