Hi Andrea,
I realized that my previous answer to another paneling question might help here.
Instead of using gsn_panel, you can use gsn_panel_return. This is a function that is identical to gsn_panel, except it returns all the plot ids with the new resized values.
I think your code might look like this:
pids = gsn_panel_return(wks, plot, (/2,2,2/), panel_res)
and then to retrieve the top left corner of the top-left plot, you can try:
getvalues pids(0)
"vpXF" : vpx
"vpYF": vpy
end get values
However, I think I can come up with a better example for you. Would you be able to share your code and data, and I'll create an example?
You can use our ftp, and you can send the information to just me if you don't want to post it to ncl-talk:
http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
Thanks,
--Mary
On Jul 30, 2013, at 12:40 PM, Andrea Allan wrote:
> Hello,
>
> I am trying to create a panel plot and want to display a common title that is aligned with the left edge of the panels. I would like to use "getvalues" to automate this process, as the size & location of my panels change with each plot and manually entering the x-position each time gets very tedious.
>
> A sample of my code is below. When I use "getvalues" on plot(0) -- the top-left plot on the panel, the retrieved vpXF value does not match any of the values displayed from gsnPanelDebug. Can anyone provide some insight on this? Thanks a lot!
>
>
> do n=0,5
> res@gsnRightStringFontHeightF = 0.025
> res@gsnRightStringOrthogonalPosF = 0.02
> res@gsnRightString = rightStrings(n)
> res@gsnLeftStringFontHeightF = 0.025
> res@gsnLeftStringOrthogonalPosF = 0.01
> res@gsnLeftString = leftStrings(n)
> plot(n)=gsn_csm_contour_map(wks,data(n,:,:),res)
> end do
>
> getvalues plot(0)
> "vpXF" : xloc
> "vpYF" : yloc
> end getvalues
>
> panel_res = True
> panel_res@gsnPanelDebug = True
>
>
> panel_res@gsnPanelRowSpec = True
> panel_res@Maximize = True
>
>
> panel_res@gsnPanelXWhiteSpacePercent = 2.
> panel_res@gsnPanelYWhiteSpacePercent = 2.
>
> panel_res@gsnPanelCenter = False
>
> panel_res@gsnPanelBottom = 0.05
>
> panel_res@gsnPanelTop = 0.95
>
> panel_res@txString = title
> panel_res@txFont = 21
> panel_res@txFontHeightF = 0.018
> panel_res@txPosXF = xloc
>
> gsn_panel(wks, plot, (/2,2,2/), panel_res)
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 31 14:04:01 2013
This archive was generated by hypermail 2.1.8 : Thu Aug 01 2013 - 15:55:03 MDT