If all your data is between 0-2*pi this is easy to do. If it is not, well, put it between that range, it should be not difficult to do. theta = rand([200 1])*2*pi; % create angles between 0-2pi nbins=12; % Define Number of bins h=rose(theta,nbins); title(['Marker '], 'FontSize',20) %plot x=get(h,'Xdata');...

Use histc instead of hist. histc allows you to define the edges while hist uses the second input parameter as centers.

python,matplotlib,histogram,bins

I am a bit confused with your data structure and how you are calling the function hist. However, I suppose you are using matplotib, so you need to define the same binning range for the hist function. It works better if you pass an array with the bin boundaries, instead...

EDIT: The below answer is only valid for versions of Pandas less than 0.15.0. If you are running Pandas 15 or higher, see: data3['bins_spd'] = pd.qcut(data3['spd_pct'], 5, labels=False) Thanks to @unutbu for pointing it out. :) Say you have some data that you want to bin, in my case options...

Technically speaking, this is a barplot and not a histogram (histograms specifically refer to barplots used to represent binned frequencies of continuous variables) ... Your cbind() is messing things up (converting abatement and cost to factors): data <- data.frame(measure, abatement, cost) Here's a start: with(dplyr::arrange(data,cost), barplot(width=abatement,height=cost,space=0)) ...