Custom histogram plotting
See original GitHub issueHi @marcomusy,
I am trying to follow the example from here in order to plot a similar to the following histogram graph:
However, I am not sure whether it is possible to have the range of the bins given. I’ve tried the following but didn’t really work:
import os
import numpy as np
import pandas as pd
import vedo as vd
from vedo.pyplot import histogram, plot, settings
LUX_BINS = [100, 250, 500, 750, 1000, 2000, 5000, 10000]
data = pd.read_csv("ls_room_999.csv", header=None, delimiter=',', low_memory=False).to_numpy(dtype='float')
cluster_ids_x = np.digitize(data[:,4].reshape(-1, 1), LUX_BINS)
classes, class_counts = np.unique(cluster_ids_x, return_counts=True)
points_percentage = class_counts * 100 / cluster_ids_x.size
plt = histogram(data[:, 4], title="hist", bins=LUX_BINS, density=False, c='cyan3', aspect=8 / 7)
plt.show(size=(800, 700), zoom=1.2, interactorStyle="Image").close()
Is it possible to have the ranges of the bins given and accordingly apply it to the hist?
Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Free Histogram Maker - Create Histograms Like a Pro | Visme
Fully customizable histogram maker with premade templates. Download as a single chart or save as a content block to add to a project....
Read more >Python Histogram Plotting: NumPy, Matplotlib, Pandas ...
In this tutorial, you'll be equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features.
Read more >Histogram maker - Statistics Kingdom
Histogram maker. Creates histogram with customization options like bin size, colors, min, max and the option to remove outliers.
Read more >Creating Custom Histograms With Weights & Biases - Wandb
Log a custom histogram—sort a list of values into bins by count/frequency of occurrence—natively in a few lines.
Read more >Easy Histogram Maker
Creates an editable histogram that represent a frequency distribution. Calculates mean, standard deviation, and so on.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Νοpe, please feel free.
(I will close this now)
You should educate them LOL Would you mind if I add a simplified version of this among the pyplot examples?