Matlab, how do I change the default scatter plot size?

945 Views Asked by At

I am trying to do a approximation plot with Runge Kutta. In matlab, the discrete plot I use is "scatterplot".

Unfortunately because of so many data points, the data points get mashed in and forms a line almost.

Also each data point is a giant empty circle. I was wonder if it is possible to just plot dots.

Examples of what I am getting.

is it possible to make it more sparse and dotted points instead of void circles? Thanks enter image description hereenter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

From the Matlab documentation:

scatterplot(x,n,offset,plotstring) is the same as the syntax above, except that plotstring determines the plotting symbol, line type, and color for the plot. plotstring is a string whose format and meaning are the same as in the plot function.

and for plotting dots with the plot function you can use plot(A,B,'.') i.e. '.' is the plotstring you want.

For more information have a look here

Example

theta = linspace(0,1,500);
x = exp(theta).*sin(100*theta);
y = exp(theta).*cos(100*theta);
figure
s = scatter(x,y,'.');
figure
t = scatter(x,y,'sr');

will output:
enter image description here

enter image description here