Skip to content

Commit

Permalink
Fix matplotlib depreciation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Jan 12, 2021
1 parent cff5cd2 commit f84f0eb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mesaPlot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,14 @@ def _listAbun(self,data,prefix=''):
def _splitIso(self,iso,prefix=''):
name=''
mass=''
iso=iso[len(prefix):]
if prefix in iso:
iso=iso[len(prefix):]
for i in iso:
if i.isdigit():
mass+=i
else:
name+=i

if 'neut' in name or 'prot' in name:
mass=1
return name,int(mass)
Expand Down Expand Up @@ -1061,9 +1063,9 @@ def _plotAnnotatedLine(self,ax,x,y,xmin,xmax,fy=None,ymin=None,ymax=None,annotat
y=y[ind]

if xlog:
ax.set_xscale("log", nonposx='clip')
ax.set_xscale("log", nonpositive='clip')
if ylog:
ax.set_yscale("log", nonposy='clip')
ax.set_yscale("log", nonpositive='clip')
if np.all(y<=0):
return

Expand Down Expand Up @@ -2034,10 +2036,10 @@ def plotKip3(self,m,plot_type='history',xaxis='model_number',yaxis='mass',zaxis=
if y2 is not None:
ax2=ax.twinx()
if y2log:
ax2.set_yscale("log",nonposy='clip')
ax2.set_yscale("log",nonpositive='clip')

if y1log:
ax.set_yscale("log", nonposy='clip')
ax.set_yscale("log", nonpositive='clip')


if plot_type=='history':
Expand Down

0 comments on commit f84f0eb

Please sign in to comment.