Skip to content

Commit 1ff1010

Browse files
author
pviz
committed
Change axes labels
To demonstrate possibility to change axes names, added this to example_flat.py atmos_grids bugfix
1 parent 97a94a3 commit 1ff1010

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

atmos_grids.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def AddYPlane(y, bounds=[0.0,360.0,-90.0,90.0,1e3,0.1], ratios=[1,1,1], logCoor
8282
yLoc = Lin2Log(y,ratios[1],basis[logCoord.index(1)])
8383
else:
8484
yLoc = y*ratios[1]
85-
print 'AddYPlane',yLoc,bounds
85+
8686
(Xmin,Xmax,Ymin,Ymax,Zmin,Zmax) = BoundAspectRatio(bounds, ratios, logCoord, basis)
8787
if data == 1 : #extract plane from data
8888
Plane1 = Slice(src)

examples/example_flat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
## add axes and grid
6666
LabSze = 6.0
6767
Bounds = [0,360,-90,90,1e3,0.01]
68-
# outside box
69-
AddGrid(xlevels=[0,360],ylevels=[-90,90],zlevels=[1e3,0.1],bounds=Bounds, ratios=ratio, logCoord=logCoord, basis=basis, AxisWidth=2.0,LabelSize=LabSze)
68+
# outside box, rename axes
69+
AddGrid(xlevels=[0,360],ylevels=[-90,90],zlevels=[1e3,0.1],bounds=Bounds, ratios=ratio, logCoord=logCoord, basis=basis, AxisWidth=2.0,LabelSize=LabSze, AxisNames=["longitude","latitude","pressure [hPa]"])
7070
# inside grid lines: add only line labels, not axis labels
7171
AddGrid(xlevels=[90,180,270],ylevels=[-45,0,45],zlevels=[1e2,10,1],bounds=Bounds,ratios=ratio, logCoord=logCoord, basis=basis, AxisWidth=1.0,LabelSize=-LabSze)
7272

0 commit comments

Comments
 (0)