Skip to content

Commit

Permalink
workaround for issue #23
Browse files Browse the repository at this point in the history
  • Loading branch information
mpound committed Mar 24, 2021
1 parent aff4c6c commit c3cb422
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pdrtpy/plot/modelplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,9 @@ def _plot_no_wcs(self,data,header=None,**kwargs):
colors = kwargs_opts['meas_color'][jj]*mlen
if kwargs_opts['shading'] != 0:
cset = self._axis[axidx].contourf(x.value,y.value,k.data,levels=m.levels, colors=colors,alpha=kwargs_opts['shading'])
# Add extra call to plot contour because savefig("file.pdf") gets zorder of shading vs. contour wrong and contour lines don't show up. Only a bug when output is pdf. Harumph.
# See https://github.com/mpound/pdrtpy/issues/23
cset2 = self._axis[axidx].contour(x.value,y.value,k.data,levels=[m.levels[1]], colors=colors, alpha=kwargs_opts['shading'])
else:
cset = self._axis[axidx].contour(x.value,y.value,k.data,levels=m.levels,
linestyles=lstyles, colors=colors)
Expand Down

0 comments on commit c3cb422

Please sign in to comment.