PDA

View Full Version : Plot histogram fig with column chart



yellowfisher
6 Jul 2015, 12:52 AM
As the picture, How can i do to realize the python's third-party lib function matplotlib.pyplot.hist() with Ext.chart?

Gary Schlosberg
6 Jul 2015, 11:09 AM
Are you asking how to integrate Python with Ext JS to create histograms or are you asking how to create something similar within Ext JS?

yellowfisher
6 Jul 2015, 6:27 PM
Thanks for your reply.
I'm asking how to create something similar within Ext JS. Now I have a list which contains 2000 float values, and I would divide these values into 11 intervals.
I want Y axis show the frequency of each interval, X axis show the intervals.
I've checked column chart but still get no idea.

Gary Schlosberg
7 Jul 2015, 3:17 PM
There's no histogram chart type specifically, but you should be able to use a column chart (http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.chart.series.Column), which is very similar in appearance. I'm guessing, however, that you may need to preprocess you data and aggregate it yourself into the 11 intervals you mentioned.

yellowfisher
7 Jul 2015, 5:41 PM
What about each interval's frequency? Also need to be preprocessed as a Ext.data.Store?
Do you mean the column chart (http://docs.sencha.com/extjs/4.2.3/#%21/api/Ext.chart.series.Column) can only plot datas I give, but can not calculate anything for me?

yellowfisher
7 Jul 2015, 5:48 PM
What about Y axis data? Do I need to preprocess my data and work out a Ext.data.Store about each interval's frequency to be the Y axis fields?
And you mean column chart can only plot datas I give , but can't calculate anything for me?