필터 지우기
필터 지우기

How to plot a single data point at a specific location?

조회 수: 3 (최근 30일)
Bret Valenzuela
Bret Valenzuela 2016년 6월 6일
답변: dpb 2016년 6월 7일
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
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?
Bret Valenzuela
Bret Valenzuela 2016년 6월 7일
Sure! I could not find any examples of a type of plot I need but I will try and explain in better detail. by .8 to 2 I mean i need to plot a point that is in that range. If my x axis is from 0:8 with a step of one then I need to plot a point that has its x value between .8 and 2. Does that make sense?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
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개)

dpb
dpb 2016년 6월 7일
Alternatively,
stairs(x,y)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by