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

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.

 Respuesta aceptada

Steven Lord
Steven Lord el 14 de Jul. de 2015

1 voto

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 comentarios

Cameron Jewell
Cameron Jewell el 14 de Jul. de 2015
The program being written is used to display data (all +85000) along with irregularities in a way easily and visually understandable. The axes used is only a small portion of the GUI window and at this point in time will not be changed.
The thousands of points are all within a range of 100 - 105 by 25 - 30 and because of this they are too closely grouped together.
I imagined an easy fix would be to decrease the size of the dots to give more of a line appearance (there is a line connecting all of the dots as well), but this may not be the best approach?
Image Analyst
Image Analyst el 14 de Jul. de 2015
Don't use 'bo-' in plot(), just do it like Azzi showed. If you want just a dot rather than a circle, you can use 'b.'. Don't use a dash because with 85000 points, having a line connect them probably would clutter things up too much. By the way, have you thought about using an image to display the data rather than a plot?
Cameron Jewell
Cameron Jewell el 14 de Jul. de 2015
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 el 14 de Jul. de 2015
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!

Iniciar sesión para comentar.

Más respuestas (1)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Preguntada:

el 14 de Jul. de 2015

Comentada:

el 14 de Jul. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by