<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I have 4 time series plots that I want to panel in 4 rows with minimal white space in between them - I do not want to attach the plots to a common axis however.<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I'm unable to achieve this using the "gsnPanelYWhiteSpacePercent" resource.<br>On using this resource I get the following warning:<br><b><br>warning:gsnPanelYWhiteSpacePercent is not a valid resource in IAP260m-ts_xy at this time</b><br><br>Here's the relevant part of my script:<br><br><i><span style="font-family:verdana,sans-serif"><font size="1">;---Start the graphics<br>wks = gsn_open_wks("x11","IAP260m-ts") ; send graphics to PNG file<br>;---Plotting options for time series plot<br>res = True<br>res@gsnMaximize = True<br>;res@gsnPaperOrientation = "landscape"<br>;res@vpKeepAspect=False<br>res@tiMainString = "Pollutants at 260m at IAP site" ; add title<br>res@vpWidthF = 2<br>res@vpHeightF = 0.4<br>res@xyMarkLineMode = "Lines"<br>res@xyMarkers = (/0,0,0,0/)<br>res@tmXTOn = False<br>res@tmYLFormat = "f" ; remove trailing ".0"<br>res@xyDashPatterns = (/0,0,0,0/) ; Make curves all solid<br>res@xyLineThicknesses = (/ 1.0, 1.0, 1.0, 1.0/) ; make second line thicker<br>res@xyLineColors = (/"blue","black", "black", "red"/) ; change line color<br>;--------------------------------------------------<br>; The time_axis_label function adds additional<br>; resources to "res" to produce nicely-formatted<br>; time labels on X axis. This function only works<br>; if you have a time "units" recognized by the<br>; cd_calendar function.<br>;--------------------------------------------------<br> restick = True<br>; restick@ttmFormat = "%D_%H"<br> restick@ttmFormat = "%D"<br>; restick@ttmNumTicks = 20<br> restick@ttmMajorStride= 48<br> restick@ttmMinorStride= 24<br> timearr = ispan (1,696,1)<br> timearr@units = "hours since 2014-10-15 00:00:00"<br> time_axis_labels(timearr,res,restick)<br>res@trXMaxF=max(timearr)<br>;res@tiMainString = filename<br>; res@tiYAxisString = "PM 2.5 in ug/m^3"<br> res@tiMainFontHeightF = 0.05<br> res@tiYAxisFontHeightF = 0.05<br> res@tmXBLabelFontHeightF = 0.05<br>; res@tmYLLabelFontHeightF = 0.05<br> res@tmYUseLeft = False ; Make right axis independent of left<br> res@tmYLOn = False ; Turn off left tickmarks<br> res@tmYROn = True ; Turn on right tickmarks<br> res@tmXTOn = False ; Turn off top tickmarks<br> res@tmYLLabelsOn = False ; Turn off left labels<br> res@tmYRLabelsOn = True ; Turn on right labels<br> res@tmYRMinorOn = False ; Turn off minor ticks on Y axis<br> res@tmYRLabelFontHeightF = 0.04 ; Increase font height<br> res@tmYRLabelDeltaF = 2.0 ; Increase space b/w ticks and labels<br> res@tmYRLabelJust = "CenterRight" ; right-justify labels<br> ;res@tmXBMajorOutwardLengthF = 0.0 ; draw tickmarks inward<br> ;res@tmXBMinorOutwardLengthF = 0.0 ; draw minor ticks inward<br> ;res@gsnPanelYWhiteSpacePercent = 0.0<br> res@gsnBoxMargin = 0.0<br> res@pmLegendDisplayMode = "Always" ; turn on legend<br> res@pmLegendSide = "Top" ; Change location of<br> res@pmLegendParallelPosF = .90 ; move units right<br> res@pmLegendOrthogonalPosF = 0 ; move units down<br> res@pmLegendWidthF = 0.3 ; Change width and<br> res@pmLegendHeightF = 0.3 ; height of legend.<br> res@lgPerimOn = False ; turn off box around<br> res@lgLabelFontHeightF = .03 ; label font height<br> res@xyExplicitLegendLabels = (/"baseline","APEC-control","Oct-control","obs"/) ; create explicit labels<br> res@gsnDraw = False ; don't draw<br> res@gsnFrame = False ; don't advance frame<br>; Change y axis string and color for each plot.<br> res@tiYAxisString = "OC"<br> xy1 = gsn_csm_xy(wks,timearr,var_matrix_oc,res) ; Create the four plots.<br> res@pmLegendDisplayMode = "Never" ; turn off legend for subsequent plots<br> res@tiYAxisString = "NO3"<br> xy2 = gsn_csm_xy(wks,timearr,var_matrix_no3,res)<br> res@tiYAxisString = "SO4"<br> xy3 = gsn_csm_xy(wks,timearr,var_matrix_so4,res)<br> res@tiYAxisString = "NH4"<br> xy4 = gsn_csm_xy(wks,timearr,var_matrix_nh4,res)<br><br>;************************************************<br>; create panel<br>;************************************************<br> resP = True ; modify the panel plot<br> resP@gsnPanelMainString = "Surface pollutants at IAP site" ; set main title<br> gsn_panel(wks,(/xy1,xy2,xy3,xy4/),(/4,1/),resP) ; now draw as one plot</font></span></i><br><br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Please let me know what can I change here to get the desired result.<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br><br><br clear="all"></div><div><div class="gmail_signature"><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></div>
</div>