diff --git a/Packages/vcs/Lib/template.py b/Packages/vcs/Lib/template.py index 03b3f528f7..b0fdf45790 100644 --- a/Packages/vcs/Lib/template.py +++ b/Packages/vcs/Lib/template.py @@ -912,7 +912,7 @@ def drawTicks(self,slab,gm,x,axis,number,vp,wc,bg=0,X=None,Y=None,**kargs): for t in loc.keys(): loc[t]='' if isinstance(loc,str): - loc = vcs.elements["list"].get(loc,{}) + loc = copy.copy(vcs.elements["list"].get(loc,{})) # Make sure the label passed are not outside the world coordinates dw1=1.E20 dw2=1.E20 diff --git a/testing/vcs/CMakeLists.txt b/testing/vcs/CMakeLists.txt index 0f4204e4f0..c668c2061f 100644 --- a/testing/vcs/CMakeLists.txt +++ b/testing/vcs/CMakeLists.txt @@ -247,16 +247,21 @@ cdat_add_test(vcs_test_taylor_2_quads cdat_add_test(vcs_test_1d_marker_not_shown_if_xaxis_flipped "${PYTHON_EXECUTABLE}" ${cdat_SOURCE_DIR}/testing/vcs/test_1d_marker_not_shown_if_xaxis_flipped.py - ${BASELINE_DIR}/test_1d_marker_not_shown_if_xaxis_flipped.png + "${BASELINE_DIR}/test_1d_marker_not_shown_if_xaxis_flipped.png" ) # These test actually plot things need sample data if (CDAT_DOWNLOAD_SAMPLE_DATA) + cdat_add_test(test_vcs_lon_axes_freak_out + "${PYTHON_EXECUTABLE}" + ${cdat_SOURCE_DIR}/testing/vcs/test_lon_axes_freak_out.py + "${BASELINE_DIR}/test_lon_axes_freak_out.png" + ) cdat_add_test(test_vcs_isofill_mask_cell_shift "${PYTHON_EXECUTABLE}" ${cdat_SOURCE_DIR}/testing/vcs/test_vcs_isofill_mask_cell_shift.py - ${BASELINE_DIR}/test_vcs_isofill_mask_cell_shift.png + "${BASELINE_DIR}/test_vcs_isofill_mask_cell_shift.png" ) cdat_add_test(vcs_test_bad_time_units "${PYTHON_EXECUTABLE}" diff --git a/testing/vcs/test_lon_axes_freak_out.py b/testing/vcs/test_lon_axes_freak_out.py new file mode 100644 index 0000000000..754f2270a7 --- /dev/null +++ b/testing/vcs/test_lon_axes_freak_out.py @@ -0,0 +1,29 @@ +import os,sys,vcs,cdms2 +src=sys.argv[1] +pth = os.path.join(os.path.dirname(__file__),"..") +sys.path.append(pth) +import checkimage + + +f=cdms2.open(os.path.join(vcs.prefix,"sample_data","clt.nc")) +s=f("clt") +s3=f("clt",longitude=(0,360)) + +print s.shape,s3.shape + + +x=vcs.init() +x.drawlogooff() +x.setbgoutputdimensions(1200,1091,units="pixels") + +x.plot(s,bg=1) +x.clear() +x.plot(s3,bg=1) + +fnm = "test_lon_axes_freak_out.png" + +x.png(fnm) +print "fnm:",fnm +print "src:",src +ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold) +sys.exit(ret)