<div dir="ltr">Hi Rick<div>Thanks for opening my eyes too. Sorry Kerwyn for misleading you. I was also under the wrong impression all these time. </div><div>You never stop learning!! </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 5:48 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I certainly appreciate Sudipta's participation here, but this would not work:</div><span class=""><div><br></div><div><span style="font-size:13px">wks = gsn_open_wks(wks_type,"test") <br></span><span style="font-size:13px"> wks@wkWidth = 2500<br> wks@wkHeight = 2500</span><br></div><div><span style="font-size:13px"><br></span></div></span><div><font color="#000000">For various esoteric reasons, the resources have to specified at the time the workstation is created, and the correct form is (oddly enough), what Kerwyn originally had:</font></div><span class=""><div><font color="#000000"><br></font></div><div><div style="font-size:13px"><div><div>wks_type = "png"<br></div>wks_type@wkWidth = 2500<br></div>wks_type@wkHeight = 2500<br></div><span style="font-size:13px">wks = gsn_open_wks(wks_type, "test")</span><font color="#000000"><br></font></div><div><span style="font-size:13px"><br></span></div></span><div><span style="font-size:13px">However, the error messages being reported do not make sense in this context, and I agree with Sudipta that there must be something else going on on the script, and perhaps the whole thing could be posted.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Here's a simple script from our examples that demonstrates this:</span></div><div><span style="font-size:13px"><br></span></div><div><p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)">begin</p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> a = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/<a href="http://uv300.nc" target="_blank">uv300.nc</a>","r")<br></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> u = a->U(0,:,:)</p><span class="">
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"><br></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> wks_type = "png"<br></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> wks_type@wkWidth = 2500</p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> wks_type@wkHeight = 2500</p>
</span><p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> wks = gsn_open_wks(wks_type,"gsn_xy") </p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156);min-height:15px"> ;;These do not work; uncomment and comment out the wks_type@ versions above to demonstrate</p><p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156);min-height:15px"> ;wks@wkWidth = 2500</p><p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156);min-height:15px"> ;wks@wkHeight = 2500</p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"><br></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> res = True ; plot mods desired</p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> res@tiYAxisString = u@long_name + " "+u@units ; add units to title </p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> res@tiMainString = "Example of gsn_y" ; title</p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)"> plot=gsn_y(wks,u(:,30),res)</p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156);min-height:15px"><br></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(254,244,156)">end</p></div><div><br></div><div>Hope this helps...</div><span class="HOEnZb"><font color="#888888"><div>Rick</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 3:17 PM, sudipta sarkar <span dir="ltr"><<a href="mailto:sdptsarkar2@gmail.com" target="_blank">sdptsarkar2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am sure you are doing something else wrong in the rest of the code. Please post the rest of the code. I just tried this and it works fine. Also what version of ncl are you using. <div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 5:12 PM, Kerwyn Texeira <span dir="ltr"><<a href="mailto:ktish86@gmail.com" target="_blank">ktish86@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Sorry again, but when I did exactly that, the same error showed up. I attached the figure for you to see how small it is.<br><br></div>Script;<br><br>wks_type = "png" <br><span><span> wks = gsn_open_wks(wks_type,"test") <br></span></span><span><span> wks@wkWidth = 2500<br> wks@wkHeight = 2500<br><br><br></span></span></div>Error again;<span><span><br>warning:wkImageFileName is not a resource in the given object<br>warning:wkImageFormat is not a resource in the given object<br><br></span></span></div><span><font color="#888888">**Kerwyn<br><div><br><br></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 2:00 PM, sudipta sarkar <span dir="ltr"><<a href="mailto:sdptsarkar2@gmail.com" target="_blank">sdptsarkar2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">See my other email that I sent to the general list. when you do:<div>wks_type = "png" </div><div>then the variable "wks_type" is just a string variable. </div><div>Its the variable "wks" which is initiated as:</div><span><span><div>wks = gsn_open_wks(wks_type,"test")</div></span></span><div>that is the resource variable whose width and height can be set, </div><div><br></div><div>Hope its clear now. </div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 4:56 PM, Kerwyn Texeira <span dir="ltr"><<a href="mailto:ktish86@gmail.com" target="_blank">ktish86@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I don't thiking that I understand clearly. When I state wks = True or wks = "png" and did as you stated wks.wkWidth = 250 and wks.wkHeight = 2500, I got the following errors again;<span><span><br><br>warning:wkImageFileName is not a resource in the given object<br>warning:wkImageFormat is not a resource in the given object<br><br></span></span></div><span><font color="#888888">**Kerwyn<br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 1:43 PM, sudipta sarkar <span dir="ltr"><<a href="mailto:sdptsarkar2@gmail.com" target="_blank">sdptsarkar2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You have to first initialize wks as you have done and then do the following:<div>Like wks.wkWidth = 2500</div><div>Wks.wkHeight =2500</div><div><div><div><br>On Wednesday, March 16, 2016, Kerwyn Texeira <<a href="mailto:ktish86@gmail.com" target="_blank">ktish86@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I did the following and I got the same error; <br><br></div>wkWidth = 2500<br><div>wkHeight = 2500<br></div><div><br></div><div>wks = gsn_open_wks("png", "test")<br><br></div><span><div>Error:warning:wkImageFileName is not a resource in the given object<br>warning:wkImageFormat is not a resource in the given object<br><br><br></div></span><div>I'm not sure what is going on.<br><br></div><div>**Kerwyn<br></div><div><br></div><div><br></div></div><span><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 1:28 PM, Sudipta Sarkar <span dir="ltr"><<a>sdptsarkar2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Kerwyn<br>
"Wks_type" is just a string. You have to resize using the variable "wks". That's the one that is the resource variable<br>
<br>
Sent from my iPhone<br>
<div><div><br>
> On Mar 16, 2016, at 4:25 PM, Kerwyn Texeira <<a>ktish86@gmail.com</a>> wrote:<br>
><br>
> Hi nc-talk,<br>
><br>
> I trying to resize my figures in "png" format but I'm having issues. The size of the images are not changing.<br>
><br>
> Script:<br>
><br>
> wks_type = "png"<br>
> wks_type@wkWidth = 2500<br>
> wks_type@wkHeight = 2500<br>
> wks = gsn_open_wks(wks_type, "test")<br>
><br>
> Error: warning:wkImageFileName is not a resource in the given object<br>
> warning:wkImageFormat is not a resource in the given object<br>
><br>
> Does anyone know how I can fix this?<br>
><br>
> Appreciate it much!<br>
> **Kerwyn<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a>ncl-talk@ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>
</span></blockquote></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>