agilescientific / striplog

Lithology and stratigraphic logs for wells or outcrop.
https://code.agilescientific.com/striplog
Apache License 2.0
204 stars 69 forks source link

Lithology histogram method #32

Open kwinkunks opened 9 years ago

kwinkunks commented 9 years ago

Make and plot a histogram of all depth samples, including empty ones, showing all lithologies.

kwinkunks commented 5 years ago

Something like:

comps, counts = s.histogram()

labels = [c.pay for c in comps]
colours = [legend.get_colour(c) for c in comps]

fig, ax = plt.subplots(figsize=(4,4))
ind = np.arange(len(comps))
bars = ax.bar(ind, counts, align='center')
ax.set_xticks(ind)
ax.set_xticklabels(labels)
for b, c in zip(bars, colours):
    b.set_color(c)
plt.show()

See Expert notebook, Histogram section, near the end.