Plot only markers without lines

1 588 views (last 30 days)
Rami
Rami on 20 Mar 2014
Commented: Ihaveaquest on 22 Aug 2022
Hello,
I have two matrices V(NXM) and g(NXM). I wish to plot each column in V (x axis) against each column in g(y axis). I must have the data plotted only as markers i.e without lines.
I tried 'LineStyle','none' but I didn't managed to "turn on" the marker stuff. I do not want to specify manually what markers to use beacuse I have many columns (which I will also plot on separate figures).
I thought that matlab can plot the markers and once it finished all the markers it will change color and restart the marker order.
so can I do this?
Thanks, Rami

Accepted Answer

Friedrich
Friedrich on 20 Mar 2014
Hi,
sounds like you are looking for the scatter or scatter3 function.

More Answers (3)

TheStranger
TheStranger on 5 Dec 2018
Hi!
I know it was like 4 years ago, but anyway.
You need to specify 'LineStyle', 'none'
  3 Comments
Esen Ozbay
Esen Ozbay on 1 Jul 2021
Thanks so much! Just what I was looking for since scatter was working problematic.

Sign in to comment.


Yash Doshi
Yash Doshi on 23 Feb 2021
Edited: Yash Doshi on 23 Feb 2021
You can also use the 'LineStyle','none' in the stem() function, and yes, MATLAB itself knows when to change markers for different columns, you just need to plot each column in a loop using (hold on).
Hope this answers and solves your query.
I know I have been very early in answering the question xD. But maybe it can be useful for anyone who sees this in the future.

Rami
Rami on 20 Mar 2014
Hey , thanks for the answer but it doesn't work so good. I want the program to chose marker style and color much like the "plot" command chooses line color when you plot more than one vector / matrix.
  2 Comments
Ihaveaquest
Ihaveaquest on 22 Aug 2022
wha if i wanted to just plot markers at oint 0 and 10??

Sign in to comment.

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by