Skip to content

Instantly share code, notes, and snippets.

@camriddell
camriddell / collect_univariates.py
Last active March 8, 2024 20:56
A collection of univariate plots
from functools import partial
from textwrap import fill
from scipy.stats import norm, uniform, skewnorm, gaussian_kde, triang
from numpy import (
array, linspace, quantile, histogram, atleast_2d, mean, std, add
)
from numpy.lib.stride_tricks import sliding_window_view
from matplotlib.pyplot import subplots, show, rc
```python
from matplotlib.pyplot import figure, subplots, show, rc, rcdefaults
from numpy.random import default_rng
from numpy import linspace, atleast_2d
from pandas import DataFrame
from scipy.stats import gaussian_kde
from seaborn import stripplot, rugplot
rcdefaults()
rc('font', size=14)
@camriddell
camriddell / Python Plotting - Working With Long Labels
Last active October 25, 2022 18:19
Summary of some of the ways one can work with long labels in both matplotlib & bokeh. Based on an example created in ggplot2 (R) https://www.andrewheiss.com/blog/2022/06/23/long-labels-ggplot/
We couldn’t find that file to show.
@camriddell
camriddell / inset_axes_example.png
Last active September 1, 2023 17:27
Example of how one can use matplotlib transforms to inset an axes along each bar of a bar chart.
inset_axes_example.png