How to plot a single data point at a specific location?
2 次查看(过去 30 天)
显示 更早的评论
I have a simple plotting question. I have a figure that has an x range from 0:0.5:8 and I have data points in the form of multiple Sauter Mean Diameters which are constant numbers. I need to arrange these points in a fashion where I plot one point in a specific spot in the graph referring to the x axis. For example my first point needs to be in between .8 and 2 my second between 2 and 3 etc... Any help I could get on this topic would be much appreciated.
2 个评论
dpb
2016-6-6
For points at (x,y) locations, probably
doc scatter
is your friend. But, I made this a Comment instead of an Answer because I don't follow how "example my first point needs to be in between .8 and 2" relates to _"plot[ting] one point in a specific spot in the graph referring to the x axis"???
Can you explain more fully or, better yet, show an example of the plot you expect/want?
采纳的回答
Walter Roberson
2016-6-7
You can use histc() or histcounts() to classify each point value into a "bin" number whose bin boundaries you specify. You would use the second output of histc() to get the bin number, and if I recall you would use the third output of histcounts()
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!