Skip to content

Commit

Permalink
Minor plotting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mandli committed May 14, 2013
1 parent 6855278 commit d77d79e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions 1d/setplot_wave_family.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def twin_axes(cd):
vel_axes.set_ylim(ylimits_velocities)

# Add axis labels (not sure why this needs to be done)
# locs = vel_axes.xaxis.get_ticklocs()
# vel_axes.xaxis.set_ticklabels([str(loc) for loc in locs])
locs = vel_axes.xaxis.get_ticklocs()
vel_axes.xaxis.set_ticklabels([str(loc) for loc in locs])

# This does not work on all versions of matplotlib
try:
Expand Down Expand Up @@ -239,6 +239,10 @@ def twin_axes_zoomed(cd):
vel_axes.set_xlim(xlimits_zoomed)
vel_axes.set_ylim(ylimits_velocities_zoomed)

# Add axis labels (not sure why this needs to be done)
locs = vel_axes.xaxis.get_ticklocs()
vel_axes.xaxis.set_ticklabels([str(loc) for loc in locs])

# This does not work on all versions of matplotlib
try:
mpl.subplots_adjust(hspace=0.1)
Expand Down Expand Up @@ -276,8 +280,8 @@ def twin_axes_zoomed(cd):

plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
# plotdata.print_framenos = [0,25,50] # list of frames to print
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_framenos = [0,20,25,30,50] # list of frames to print
# plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
Expand Down
4 changes: 2 additions & 2 deletions 1d/setplot_well_balanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def fill_items(plotaxes):

def bathy_axes(cd):
# km_labels(cd)
mpl.xlabel('m')
mpl.ylabel('m')
mpl.xlabel('Depth (m)')
mpl.ylabel('x (m)')
mpl.title("Depths at t=%2.1f" % cd.t)
# mpl.xticks([-300e3,-200e3,-100e3,-30e3],[300,200,100,30],fontsize=15)
# mpl.xlabel('km')
Expand Down

0 comments on commit d77d79e

Please sign in to comment.