How to chose the correct line style?
1 view (last 30 days)
Show older comments
Louise Wilson on 21 Jul 2021
I have created the attached plot. I have a large dataset with multiple entries, each representing different moving objects. I want to draw a line plotting the movement of each unique object, per day. This works, but the display is different depending on whether I use scatter or plot. If I use plot, I get the type of line I would like, where the lines are connected, but using scatter, solitary points (that aren't moving) are missed from the plot. How do I choose a line style which allows me to show both the solitary points and connect those points that are related?
For example, I see that I could just plot one of each line style over the top of each other, but then I lose the unique colours attached to each set of data points.
[N,edges,bin] = histcounts(datetime(gps_sub.cpa1,'ConvertFrom','datenum'),'BinMethod','day');
xticks(starttime:days(7):endtime); %change range of x-axis using times from .wav
great to hear it was what you were searching for. i will post the comment as answer below, you can then accept it and then this forum has one question less to be solved
looks like you have to add a marker to your plot atcommand, then you do not only have lines but also markers during and the ends of the lines
Find more on Annotations 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!