Skip to content

Instantly share code, notes, and snippets.

View acssantos's full-sized avatar

Anderson Santos acssantos

View GitHub Profile
@acssantos
acssantos / histogram_logx_scale.py
Last active May 24, 2022 20:33
Code to make a histogram plot with X axes in the logarithmic scale
import numpy as np
import plotly.graph_objects as go
def log_histogram(data_list, names=None, bins=None):
""" Plot histogram in log scale bins
It constructs the numpy histogram with logarithm of data
and plots a bar graph with customized ticks and hover.
The plotly library does not have the option of ploting logscale