[ncl-talk] dimension size mismatch when using gsn_add_text
Anne
anne.seidenglanz at unive.it
Sat Mar 16 07:29:48 MDT 2019
Hello NCL users,
I am trying to add a label to my xy plot using the routine gsn_add_text.
However this causes a 'dimension size mismatch' error message. I don't
really understand why this would be a mismatch because I haven't defined
this variable anywhere else in the script.
So I used:
plot0 = gsn_csm_xy (wks, years2, var_diff(:,month),res)
txres = True
;txres at txFontHeightF = fheight ; Set the font height
txres at txJust = "CenterRight"
txres at txFontHeightF = 0.014
label = "Mean response =
"+var_ens_diff_mean+""
text = gsn_add_text(wks, plot0, label, 1994, -100, txres)
plot1 = gsn_csm_xy (wks, years, var_ens_diff(:,month), res)
overlay(plot0, plot1)
draw(plot0)
frame(wks)
So basically this is an overlaid xy scatter plot, and I've applied my label
to the base plot (plot0). The error message that shows up refers to the
line where gsn_add_text is used (text = ...). Both the x and y coordinates
in gsn_add_text are coordinates as they appear in the plot, so this
shouldn't cause a problem.
Thanks for any help,
Anne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190316/b57f6297/attachment.html>
More information about the ncl-talk
mailing list