<br><br><div class="gmail_quote">On Wed, Apr 16, 2008 at 4:42 AM, Maat, Herbert ter <<a href="mailto:Herbert.termaat@wur.nl">Herbert.termaat@wur.nl</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Arlindo,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I will get back to you about the documentation when I have
returned from the US. Will the PyGrADS application change with the release of
GrADS2.0 for Windows?</font></span></div><div class="Ih2E3d">
<div dir="ltr" align="left"><span><span><font color="#0000ff" face="Arial" size="2"></font></span></span></div></div></div></blockquote><div><br>>>><br><br><span style="color: rgb(204, 0, 0);">The idea is to keep the API unchanged, although some internal tweak may be necessary. As of now, the basic gacore class works with GrADS v2 with no change whatsoever. I'd need the IPC extension in order to implement the full functionality of ganum and galab in a robust way. There are possible workarounds, but time would be best spent getting some extension functionality in v2 rather than circumventing it somehow.</span><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Ih2E3d"><div dir="ltr" align="left"> </div>
<div dir="ltr" align="left"><span><span><font color="#0000ff" face="Arial" size="2">>>></font> </span></span></div>
<div dir="ltr" align="left"><span><span> </span>The "ga" object has an instance of Basemap
attached to it, simply</span></div>
<div class="gmail_quote">
<div><span><br></span></div>
<div><span>m =
ga.map</span></div>
<div><span>m.drawcountries(...)</span></div><span></span></div>
<div><span></span> </div>
</div><div><span><span><span><font color="#0000ff" face="Arial" size="2">This helped me a lot and provided the right tools for me to
create the graph that I wanted. Thanks. I tried it yesterday with the following
statement m=ga.basemap but I coul'dn't get the drawcountries handle from
that.</font></span></span></span></div><div class="Ih2E3d">
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><span><font color="#0000ff" face="Arial" size="2">>>></font></span></span></div></div></div></blockquote><div><br><span style="color: rgb(153, 0, 0);">I really meant "m=ga.map", not "m=ga.basemap". Let me explain. You first use ga.basemap to instantiate a "Basemap" object:</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> ga.basemap(....parameters....)</span><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">internally, PyGrADS makes a call to Basemap and saves the handle under "ga.map". To get this handle,</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> m = ga.map</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> m.drawcountries()</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">In retrospect, ga.basemap() should return the Basemap handle, but right now you need a second step to get this handle. Does it make sense?</span><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Ih2E3d"><div><span><span><font color="#0000ff" face="Arial" size="2"></font></span></span></div>
<div class="gmail_quote"><span><span></span></span> </div>
</div><div class="gmail_quote">
<div><span></span><font face="Arial"><font color="#0000ff"><font size="2">I<span> don't
think that I'am still puzzled about this as I tried to
do overwrite a value of a keyword (in my case keyword area_thresh). I
received the following error message. I have a feeling that I can't overwrite
any keyword that is already a value assigned
to.</span></font></font></font><br><br><font face="Courier New"><font color="#0000ff" size="2"> [73] ga->
ga.basemap('cyl',resolution='h',area_thresh=1)<br>------------------------------------------------------------<br>Traceback
(most recent call last):<br> File "<ipython console>", line 1, in
<module><br> File "C:\Python25\lib\site-packages\grads\galab.py",
line 116, in basemap projection='cyl', **kwopts)<br><type
'exceptions.TypeError'>: type object got multiple values for keyword argument
'area_thresh'</font><br></font><font color="#0000ff" face="Arial" size="2"><span></span></font></div></div></div></blockquote><br>T<span style="color: rgb(153, 0, 0);">his seems to be an issue with Basema() itself, not the galab wrapper. For example, if you try:</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><font style="color: rgb(153, 0, 0);" face="Courier New"><font size="2">Basemap('cyl',resolution='h',area_thresh=1)</font></font><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">you get the same error message. Perhaps you could report this to the Basemap mailing list?</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">However, specifying resolution='f' may give you the desired results as it defaults to area_tresh=1 km^2.</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> Arlindo</span><br></div><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>