Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

almost there #356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/test_vcs_isofill_gap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import basevcstest

class TestVCSIsofill(basevcstest.VCSBaseTest):

def testIsofillLevels(self):
data = self.clt("clt")
iso = self.x.createisofill()
iso.projection = 'polar'
self.x.plot(data,iso)
self.checkImage("test_vcs_isofill_gap.png")
10 changes: 10 additions & 0 deletions tests/test_vcs_isoline_gap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import basevcstest

class TestVCSIsofill(basevcstest.VCSBaseTest):

def testIsofillLevels(self):
data = self.clt("clt")
iso = self.x.createisoline()
iso.projection = 'polar'
self.x.plot(data,iso)
self.checkImage("test_vcs_isoline_gap.png")
14 changes: 13 additions & 1 deletion vcs/Canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3794,11 +3794,23 @@ def __plot(self, arglist, keyargs):
if p.type in no_deformation_projections and (
doratio == "0" or doratio[:4] == "auto"):
doratio = "1t"
if arglist[3] in ["boxfill", "isofill", "isoline"]:
if numpy.allclose(copy_mthd.datawc_x1, 1.e20) and numpy.allclose(copy_mthd.datawc_x2, 1.e20):
axis = arglist[0].getAxis(-1)
amn, amx = vcs.minmax(axis)
print("ORIGINAL:",amn, amx)
bnds = axis.getBounds()
mn, mx = vcs.minmax(bnds)
if numpy.allclose(mx - mn, axis.modulo):
arglist[0] = arglist[0](**{axis.id: (mn, mx, "ooe")})
print("NEW MX MN:",vcs.minmax(arglist[0].getAxis(-1)))
copy_mthd.datawc_x1 = amn
copy_mthd.datawc_x2 = amx
for keyarg in list(keyargs.keys()):
if keyarg not in self.__class__._plot_keywords_ + self.backend._plot_keywords:
if keyarg in self.__class__._deprecated_plot_keywords_:
warnings.warn("Deprecation Warning: Keyword '%s' will be removed in the next version"
"of UV-CDAT." % keyarg, vcs.VCSDeprecationWarning)
"of CDAT." % keyarg, vcs.VCSDeprecationWarning)
else:
warnings.warn(
'Unrecognized vcs plot keyword: %s, assuming backend (%s) keyword' %
Expand Down