Hi AgitatedDove14
this is how our calls look like:
` from pytorch_lightning.loggers import TensorBoardLogger
logger = TensorBoardLogger(save_dir=".", name="debug plotting", 1)
logger.experiment.add_histogram(f"A", data[data.by == 0])
logger.experiment.add_histogram(f"B", data[data.by == 1]) `the result of which is shown in my post above.
This is some test data, and how we'd like things to look:
` def make_data(size: int=10000, n: int=5) -> pd.DataFrame:
x = np.abs(np.random.normal(size=size))
y = (3 + 0.5*np.random.normal(size=size))
data = pd.DataFrame(dict(x=x, y=y))
chunk_size = size // n
for i in range(n):
data["x"][i * chunk_size: (i + 1) * chunk_size] += 0.1 * np.random.random() * np.sqrt(i)
data["y"][i * chunk_size: (i + 1) * chunk_size] += 0.5 * np.random.random() * np.sqrt(i)
data["by"] = np.concatenate([np.full(chunk_size, i) for i in range(1, n + 1)])
return data
import joypy
n = 20
data = make_data(n=n)
labels = [i if i % 2 == 0 else None for i in range(n)]
fig, axes = joypy.joyplot(data, by="by", column=["x", "y"], fade=True, labels=labels, grid="y",
linewidth=0.5, legend=False, figsize=(6,5), title="histogram test",
colormap=plt.cm.autumn_r, alpha=0.1) `