Skip to content

Commit

Permalink
Remove semilog scale from plot due to ValueError.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Desai committed May 24, 2016
1 parent cf886d9 commit b7dc464
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tardis/tests/tests_slow/test_w7.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from numpy.testing import assert_allclose
from astropy.tests.helper import assert_quantity_allclose

import tardis
from tardis.atomic import AtomData
from tardis.simulation.base import Simulation
from tardis.model import Radial1DModel
Expand Down Expand Up @@ -145,14 +146,13 @@ def plot_spectrum(self, passed):
bbox={'facecolor': 'green', 'alpha': 0.5, 'pad': 10})
ldl_ax.plot(self.reference['wavelength'], deviation, "g+")
else:
ldl_ax.set_yscale("log")
ldl_ax.text(0.8, 0.8, 'failed', transform=ldl_ax.transAxes,
bbox={'facecolor': 'red', 'alpha': 0.5, 'pad': 10})
ldl_ax.plot(self.reference['wavelength'], deviation, "rx")

# Figure is saved in `tmp` directory right now, till a suitable way of
# saving them is decided.
plt.savefig(os.path.join("/tmp", "spectrum_plot.png"))
plt.savefig(os.path.join(self.plot_savedir, "spectrum.png"))

def test_montecarlo_properties(self):
assert_quantity_allclose(
Expand Down

0 comments on commit b7dc464

Please sign in to comment.