Skip to content

Commit 13caa76

Browse files
committed
update EOS plotters and regions plots for docs [ci skip]
1 parent 06618e7 commit 13caa76

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed
1.98 KB
Loading
1.91 KB
Loading

eos/plotter/plotter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def parse(fname):
4343
cbar_max = None
4444

4545
pcol = ax.pcolormesh(Xran, Yran, eosDT[...,2], shading='nearest', cmap=cmap, vmin=cbar_min, vmax=cbar_max)
46-
pcol.set_edgecolor('face')
4746
cax = fig.colorbar(pcol, extend='both')
4847
cax.set_label('')
4948

eos/plotter/regions.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,22 @@ def parse(fname):
2626
# overwrite with fancier labels
2727
xlabel = r'$\log(\rho/{\rm g\,cm^{-3}})$'
2828
ylabel = r'$\log(T/{\rm K})$'
29-
title = r'MESA EOS Regions ($X=0.7$, $Z=0.02$)'
3029

3130
eosDT, Yran, Xran = parse('eos_plotter.dat')
3231

3332
apjcolwidth=3.38
3433
# set up plot and labels
3534
#fig, ax = plt.subplots(figsize=(apjcolwidth,apjcolwidth*4./5.)) # for paper figures
3635
fig, ax = plt.subplots(figsize=(5,4)) # for website pngs
36+
37+
## for solar composition plot
38+
title = r'MESA EOS Regions ($X=0.7$, $Z=0.02$)'
39+
ax.text(4.0,2.3,'no coverage',fontsize='small')
40+
41+
## for Z = 1 plot
42+
#title = r'MESA EOS Regions ($X=0.0$, $Z=1.0$)'
43+
#ax.text(4.8,2.3,'no coverage',fontsize='small')
44+
3745
ax.set_title(title)
3846
ax.set_xlabel(xlabel)
3947
ax.set_ylabel(ylabel)
@@ -48,9 +56,9 @@ def parse(fname):
4856
cmap = colors.ListedColormap(my_colors)
4957
bounds = [-0.5, 0.5, 1.5, 2.5, 3.5, 5.5, 7.5]
5058
norm = colors.BoundaryNorm(bounds, cmap.N)
59+
cmap.set_under('white')
5160

5261
pcol = ax.pcolormesh(Xran, Yran, eosDT[...,2], shading='nearest', cmap=cmap, norm=norm, rasterized=True)
53-
pcol.set_edgecolor('face')
5462
cax = fig.colorbar(pcol, ticks=[0, 1, 2, 3, 4.5, 6.5])
5563
cax.set_label('')
5664
cax.ax.tick_params(labelsize='x-small')

0 commit comments

Comments
 (0)