Clear Filters
Clear Filters

Plotting a point in Matlab

35 views (last 30 days)
Fábio Oliveira
Fábio Oliveira on 2 Jul 2021
Answered: Kelly Kearney on 2 Jul 2021
Hello everyone. Do you know how to plot only one point in Matlab? If so, how to change its size?
Thank you so much.

Answers (2)

Star Strider
Star Strider on 2 Jul 2021
One approach —
x = pi;
y = pi;
plot(x, y, 'p')
plot(x, y, 'p', 'MarkerSize',50)

Kelly Kearney
Kelly Kearney on 2 Jul 2021
If you just want a single point with an arbitrary size, try plot, and play around with the 'markersize' property. Be sure to specifify a marker (the default marker is none, so a single point won't show up):
plot(1,2,'.', 'markersize', 50)


Community Treasure Hunt

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

Start Hunting!