How to plot smaller o's using plot(x,y,'o')

조회 수: 21 (최근 30일)
Cameron Jewell
Cameron Jewell 2015년 7월 14일
댓글: Cameron Jewell 2015년 7월 14일
I need to plot data points from a matrix using plot(x, y, 'o'), but the o's being plotted take up far too much space (the number of data points being plotted and displayed is +85000).
Can I use plot(x, y, 'o', 'markersize', 0.05) or something like that? Changing 'Linewidth' does not help.

채택된 답변

Steven Lord
Steven Lord 2015년 7월 14일
Do you really need to plot all 85,000 individual markers and have them visible simultaneously? What fraction of the number of pixels on your screen does each pixel take up? You can check this by querying the ScreenSize property of the groot object.
Setting a MarkerSize of 0.05 means you want each marker to take up 1/20 of a point. A point is 1/72 inch.
If you do need to plot all of them at once, I would change the axes limits to only display a small portion of the plotting region at a time or plot them using '.' as your marker instead of 'o'. Otherwise it's going to be really difficult to interpret your data, like looking at a picture of a desert and hoping to draw conclusions from the appearance of individual grains of sand.
  댓글 수: 4
Cameron Jewell
Cameron Jewell 2015년 7월 14일
I am brand new to MATLAB and this is my very first project. Having experience in Java (almost exclusively), this is entirely fresh. I do not know how an image would be of more use than a plot.
What is an image in the MATLAB syntax, and how is it different than a plot? Would it be more practical? How so? How do I use one?
Cameron Jewell
Cameron Jewell 2015년 7월 14일
Alright guys, I was able to plot using simply plot(x, y, 'black.') as suggested. I decided not to delve into the unfamiliar concept that is an "image." Using 'markersize' ended up not being an easy solution as the dots still were not very small (at least, not small enough).
Thanks for all the help!

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

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 14일
t=0:0.2:10
y=sin(t)
h=plot(t,y,'o','MarkerSize',3),

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by