Skip to content
Snippets Groups Projects
Commit 297c092f authored by Klaus Rabbertz's avatar Klaus Rabbertz
Browse files

python3 matplotlib fixes

parent 3ba61a4a
Branches
Tags
No related merge requests found
......@@ -91,7 +91,8 @@ from fastnlo import SetGlobalVerbosity
# Redefine ScalarFormatter
class ScalarFormatterForceFormat(ScalarFormatter):
# Override function that finds format to use.
def _set_format(self, vmin, vmax):
# def _set_format(self, vmin, vmax):
def _set_format(self):
self.format = "%1.2f" # Give format here
......@@ -142,7 +143,7 @@ def plotting(x_axis, xmin, xmax, iobs, xs_cn, xs_fl, xs_fu, dxsr_cn, xind, title
fig = plt.figure(figsize=(7, 5))
ax1 = plt.subplot(gs[:, :])
ax1.set_xlim([xmin, xmax])
ax1.set_xscale('log', nonposx='clip')
ax1.set_xscale('log', nonpositive='clip')
ax1.set_yscale('linear')
# Texify labels
# tlabels = []
......@@ -252,7 +253,7 @@ def plotting(x_axis, xmin, xmax, iobs, xs_cn, xs_fl, xs_fu, dxsr_cn, xind, title
ax2 = plt.subplot(gs[2, :])
# ax2 = plt.subplot(gs[2, :], sharex=ax1)
ax2.set_xlim([xmin, xmax])
ax2.set_xscale('log', nonposx='clip')
ax2.set_xscale('log', nonpositive='clip')
ax2.set_yscale('linear')
ax2.set_xlabel(r'%s' % xlabel, horizontalalignment='right',
x=1.0, verticalalignment='top', y=1.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment