Skip to content

Commit 784a426

Browse files
committed
Prevent crowding in spec plot axes
1 parent 8e6ad1b commit 784a426

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/make_spectra.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def make_spec(source, src_basename, cube_params, spec_line=None, suffix='png'):
329329
line['rad_opt']), fontsize=17)
330330
ax1_spec.tick_params(axis='both', which='major', labelsize=16)
331331
ax1_spec.autoscale(False)
332+
ax1_spec.xaxis.set_major_locator(plt.MaxNLocator(7))
332333
if 'freq' in source.colnames:
333334
ax1b_spec = ax1_spec.twiny()
334335
freq1 = (spec['freq'][-1] * u.Hz).to(u.MHz)
@@ -341,8 +342,7 @@ def make_spec(source, src_basename, cube_params, spec_line=None, suffix='png'):
341342
ax1b_spec.set_xlim(freq1.value, freq2.value)
342343
ax1b_spec.ticklabel_format(style='plain', useOffset=False)
343344
ax1b_spec.tick_params(labelsize=16)
344-
# ax1b_spec.xaxis.set_major_locator(plt.MaxNLocator(8))
345-
345+
ax1b_spec.xaxis.set_major_locator(plt.MaxNLocator(6))
346346
else:
347347
print('\t{} already exists. Will not overwrite.'.format(outfile1))
348348
fig1, ax1_spec, outfile1 = None, None, None

0 commit comments

Comments
 (0)