Comments (5)
Seems really like "histogram as bar plot kind of thing", because from the distribution-describing point of view, a bin is always a range (1.0 to 2.0, or 1.5 to 2.5).
Anyway, some approximation of what you mention should be possible (ticks="center" kind of parameter to force this). Or perhaps a generic "category" histogram solution (which I want to include) would be applicable? Let me think about it.
from physt.
Understood.
I often have quantized data with few and integer values, but nevertheless want to plot the count of. If the MPL bar plot API was not so terrible then I wouldn't file an issue here ;-)
I would not necessarily consider this as categorical data.
from physt.
Ok, I included (to support your use case):
- integer binning (bins centered around integers)
- ticks="center" argument for plot method
Example:
# Sum of two dice (should be triangle, right?)
dice = np.floor(np.random.rand(10000) * 6) + np.floor(np.random.rand(10000) * 6) + 2
histogram(dice, "integer").plot(ticks="center", density=True);
See https://github.com/janpipek/physt/blob/731d0736bb3667d455c348e9d76676df97b8e1aa/doc/Binning.ipynb for the representation :-)
Is that what you wanted?
from physt.
P.S. Currently supported just for matplotlib. I like bokeh but... later :-)
from physt.
Yip, that meets my use-case. Thanks a lot!
FWIW I think supporting two plotting backends is just making extra work for yourself - I think for better or worse MPL is all you need, as ugly as it can be ;-)
from physt.
Related Issues (20)
- Dask example broken HOT 1
- Usage of spherical histogram HOT 3
- Smooth polar histograms? HOT 7
- ImportError with newer plotly HOT 1
- Change optional dependency from uproot3 to uproot4
- Clarify the terms values / frequencies / bins / binnings...
- Automate documentation HOT 1
- Change histogram to accept data of any dimension and work a bit like histogramdd HOT 1
- Change stats into a (data)class HOT 1
- Move xarray into compat
- Remove Travis HOT 1
- Remove missed_inner and remove under/over-flow after any dangerous operation
- Be more explicit about bins too narrow for float representation HOT 1
- Consider using just float64 for the frequencies
- Wrong dask typing annotations
- Rename "human" binning to "pretty" HOT 2
- Make compatible with astropy / pint units
- Support pola.rs HOT 1
- Automate and fix doc building
- Make binnings adhere to sklearn Transformer API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from physt.