Skip to content

Commit

Permalink
fix ghost plots
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsKue committed Dec 28, 2023
1 parent 233dcf1 commit dff9e3d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/visualization/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from .rainbow import Rainbow


def scatter(samples: np.ndarray, ax=plt.axes(projection="3d"), **scatter_kwargs):
def scatter(samples: np.ndarray, ax=None, **scatter_kwargs):
if ax is None:
ax = plt.axes(projection="3d")

sns.set_style("whitegrid", {"axes.grid": False})

scatter_kwargs.setdefault("s", 8)
Expand All @@ -28,8 +31,11 @@ def scatter(samples: np.ndarray, ax=plt.axes(projection="3d"), **scatter_kwargs)
return artist


def scatter_bp(samples: np.ndarray, ax=plt.gca(), **render_kwargs):
def scatter_bp(samples: np.ndarray, ax=None, **render_kwargs):
""" This only works with blender-plot installed, which requires python==3.10.* """
if ax is None:
ax = plt.axes()

try:
import blender_plot as bp
except ImportError:
Expand Down

0 comments on commit dff9e3d

Please sign in to comment.