lovely-jax
  1. Data representations
  2. ๐Ÿ“Š View as a histogram
  • ๐Ÿ’˜ Lovely JAX
  • Data representations
    • ๐Ÿงพ View as a summary
    • ๐Ÿ–Œ๏ธ View as RGB images
    • ๐Ÿ“Š View as a histogram
    • ๐Ÿ“บ View channels
  • Misc
    • ๐Ÿค” Config
    • ๐Ÿ™ˆ Monkey-patching
    • ๐ŸŽญ Matplotlib integration
  1. Data representations
  2. ๐Ÿ“Š View as a histogram

๐Ÿ“Š View as a histogram


source

plot

 plot (x:jax.Array, center:str='zero', max_s:int=10000, plt0:Any=True,
       ax:Optional[matplotlib.axes._axes.Axes]=None)
Type Default Details
x Array Tensor to explore
center str zero Center plot on zero, mean, or range
max_s int 10000 Draw up to this many samples. =0 to draw all
plt0 Any True Take zero values into account
ax Optional None Optionally provide a matplotlib axes.
Returns PlotProxy
key = jax.random.PRNGKey(0)
t = jax.random.normal(key, (1000000,))+3

plot(t)

plot(t, center="range")

plot(t, center="mean")

plot(jnp.maximum(t-3, 0))

plot(jnp.maximum(t-3, 0), plt0=False)

fig, ax, = plt.subplots(figsize=(6, 2))
fig.tight_layout()
plot(t, ax=ax);

# # |hide
# import gc
  • Report an issue