Skip to content

Commit

Permalink
RFC: avoid pyplot interface in tests (2/3)
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Nov 2, 2024
1 parent ee69232 commit 8124a7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_image_comp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pytest
from matplotlib.colors import SymLogNorm
from matplotlib.figure import Figure

from nonos.api import Coordinates, GasDataSet, GasField, NonosLick
from nonos.styling import set_mpl_style
Expand All @@ -27,7 +28,8 @@ def tmp_mpl_state():
def test_set_mpl_style(scaling):
set_mpl_style(scaling)

fig, ax = plt.subplots()
fig = Figure()
ax = fig.add_subplot()

x = np.linspace(0, 2 * np.pi)
for phase in np.linspace(0, np.pi / 2, 5):
Expand Down

0 comments on commit 8124a7f

Please sign in to comment.