Skip to content

Commit

Permalink
fixed twin axis generation in g(r) n(r) plot
Browse files Browse the repository at this point in the history
  • Loading branch information
granrothge authored and marshallmcdonnell committed Jan 31, 2019
1 parent e86a34b commit e99a2ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Calibration/Calibration_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ def plot_gr_nr(gr_wksp,nr_wksp,xlims=(0,10),nrylims=(0,30),expected_n=None):
ax1.set_ylabel('g(r)')
#ax2=ax1.twinx()
ax2=ax1._make_twin_axes(sharex=ax1,projection='mantid')
ax2.plot(nr_h)
ax2.yaxis.tick_right()
ax2.yaxis.set_label_position('right')
ax2.yaxis.set_offset_position('right')
ax1.yaxis.tick_left()
ax2.xaxis.set_visible(False)
ax2.patch.set_visible(False)
ax2.plot(nr_h,'r')
#plots.plotfunctions.plot(ax2,nr_h,'r')
ax2.set_ylim(nrylims)
ax1.set_xlim(xlims)
Expand Down

0 comments on commit e99a2ea

Please sign in to comment.