Skip to content

Commit

Permalink
nicer plot
Browse files Browse the repository at this point in the history
  • Loading branch information
lluism committed Jul 17, 2024
1 parent c329abf commit 3658e62
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frb/galaxies/mag_dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def r_vs_dm_figure(z_min, z_max, z, PzDM, outfile='fig_r_vs_z.png',
f_mL = frb_gal_u.load_f_mL()



# Increase default font size
plt.rcParams.update({'font.size': 12})

# set up the figure
plt.figure(figsize=(6, 5))
gs = gridspec.GridSpec(1,1)
Expand Down Expand Up @@ -111,8 +115,8 @@ def r_vs_dm_figure(z_min, z_max, z, PzDM, outfile='fig_r_vs_z.png',
color='k',
size='large', ha='center')

ax.set_xlabel(r'$z$')
ax.set_ylabel(r'$m_r$')
ax.set_xlabel(r'Redshift ($z$)')
ax.set_ylabel(r'Apparent Magnitude ($m_r$)')
ax.set_xlim(xmnx)
ax.set_ylim(ymnx)

Expand All @@ -124,7 +128,7 @@ def r_vs_dm_figure(z_min, z_max, z, PzDM, outfile='fig_r_vs_z.png',
ax.xaxis.set_major_locator(plt.MultipleLocator(0.5))
plt.colorbar(c,label='p(z|DM) [a.u.]',ax=ax)

ax.legend(loc='upper right')
ax.legend(loc='upper right', frameon=True, shadow=True)
# set the title of the figure
ax.set_title(title)
frb_fig_u.set_fontsize(ax, 15.)
Expand Down

0 comments on commit 3658e62

Please sign in to comment.