Skip to content

Commit

Permalink
Deals with ambiguous coordinate names. Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
bnlawrence committed Oct 17, 2014
1 parent d1ab50f commit ef09a74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions cfgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,9 @@ def _plot(self,w,plotOptions):
cfp.con(sfield,**plotOptions['con'])
else:
i=1
self.script.add("cfp.gopen(**plotOptions['gopen'])")
cfp.gopen(**plotOptions['gopen'])
for (title,slicer) in tsList:
self.script.add("cfp.gpos(%s)"%i)
self.script.add("plotOptions['con']['title']=%s"%title)
self.script.add("plotOptions['con']['title']='%s'"%title)
self.script.add('slicer=%s'%slicer)
self.script.add("cfp.con(sfield.subspace(**slicer),**plotOptions['con'])")
cfp.gpos(i)
Expand Down
5 changes: 1 addition & 4 deletions plotConfigWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,16 @@ def getSlicesAndTitles(field,plotOptions):
# find the dimension we're stepping through.
myplot={1:'XY',3:'XZ',2:'YZ',5:'XT',4:'YT'}[plotOptions['con']['ptype']]
shape=xyshape(field) # eg XYT
print shape
stepper=shape.strip(myplot) # eg T
print stepper
dim=field.domain.axis(stepper) # eg 'dim2'
print dim
r=[]
thisTitle=title
# how many, minimum of length of field or nup
howmany=min(plotOptions['nup'],len(grid.axes[dim].array))
for i in range(howmany):
key,value=grid.names[dim],grid.axes[dim].array[i]
thisTitle+=' %s:%s '%(key,value)
r.append((thisTitle,{key:value}))
r.append((thisTitle,{dim:value}))
print shape,stepper,dim,key,value
return r

Expand Down

0 comments on commit ef09a74

Please sign in to comment.