<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Title content=""><meta name=Keywords content=""><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:Calibri;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:595.0pt 842.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body bgcolor=white lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>I’m trying to get the legend on a xy plot to not show the gridlines by adding the following:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>lgres@lgPerimFillColor = "yellow"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>lgres@lgPerimFill = "SolidFill"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>I’m doing this inside gsn_legend_ndc because I want the legend on plot(3) only:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgLineColors = (/"blue","black","red","blue","black","red"/)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@vpWidthF = 0.15 ; width of legend (NDC)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@vpHeightF = 0.1 ; height of legend (NDC)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgDashIndexes = (/0,0,0,2,2,2/) ; dash indexes<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@LgLineThicknessF = 2.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgPerimFillColor = "yellow"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgPerimFill = "SolidFill"<o:p></o:p></span></p><p class=MsoNormal><span lang=SV style='font-size:11.0pt'> gsn_legend_ndc(wks,6,(/"MCH1","MCH2","MCH3","OCH1","OCH2","OCH3"/),0.6,0.2,lgres)<o:p></o:p></span></p><p class=MsoNormal><span lang=SV style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>I can change the background color but the ”SolidFill” doesn’t seem to work. I’m calling gsn_legend_ndc before the <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>gsn_panel. Is this an issue where the plot is being added after the legend? I’ve looked at the tmGridDrawOrder but this doesn’t seem to work for gridlines in a xy plot. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>I’m using NCL version 6.4. Here’s the entire plot sequence:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@gsnDraw = False<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@gsnFrame = False<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tmXMajorGrid = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tmXMajorGridThicknessF = 1.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tmXMajorGridLineDashPattern = 2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tmYMajorGrid = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tmYMajorGridThicknessF = 1.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tmYMajorGridLineDashPattern = 2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@xyLineColors = (/"blue","black","red","blue","black","red"/)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@xyLineThicknesses = (/1,1,1,1,1,1/)*2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@xyDashPatterns = (/0,0,0,2,2,2/)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> ;res@tiYAxisString = "~F8~T~B~B~N~ (K)"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@vpHeightF = 0.5<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@vpWidthF = 1.5<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@trXMinF = -90.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@trXMaxF = 90.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@trYMinF = 230.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@trYMaxF = 280.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> plot(0) = gsn_csm_xy(wks,zmas&lat,dataas,res)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> plot(1) = gsn_csm_xy(wks,zmas&lat,datacs,res)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@trYMinF = -4.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@trYMaxF = 0.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> res@tiXAxisString = "Latitude"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> plot(2) = gsn_csm_xy(wks,zmas&lat,datace,res)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgLineColors = (/"blue","black","red","blue","black","red"/)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@vpWidthF = 0.15 ; width of legend (NDC)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@vpHeightF = 0.1 ; height of legend (NDC)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgDashIndexes = (/0,0,0,2,2,2/) ; dash indexes<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@LgLineThicknessF = 2.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgPerimFillColor = "yellow"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> lgres@lgPerimFill = "SolidFill"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><span lang=SV style='font-size:11.0pt'>gsn_legend_ndc(wks,6,(/"MCH1","MCH2","MCH3","OCH1","OCH2","OCH3"/),0.6,0.2,lgres)<o:p></o:p></span></p><p class=MsoNormal><span lang=SV style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=SV style='font-size:11.0pt'> </span><span style='font-size:11.0pt'>resP = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> resP@gsnMaximize = True<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> resP@gsnPanelFigureStrings = str_upper((/"a","b","c"/))<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> resP@gsnPanelFigureStringsFontHeightF = 0.01<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> resP@amJust = "TopLeft"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> resP@gsnPanelBottom = 0.05<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> gsn_panel(wks,plot,(/3,1/),resP)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Thanks for your advice/help with this,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>/M<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>Marston S. Johnston, PhD<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>Department of Earth Sciences<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>University of Gothenburg, Sweden<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>Email: <a href="mailto:marston.johnston@gu.se"><span style='color:#0070C0'>marston.johnston@gu.se</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>SkypeID: marston.johnston <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>Phone: +46-31-7864901 <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>Only the fruitful thing is true!<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman";color:#0070C0;mso-fareast-language:EN-GB'>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>