Effacer les filtres
Effacer les filtres

gscatter: connecting groups by lines through this function

12 vues (au cours des 30 derniers jours)
Jake Warner
Jake Warner le 21 Fév 2018
Commenté : Aseman le 9 Août 2021
Good day friendly people. I am using the gscatter function to plot my data, but (perhaps) I wish to connect them using lines that are the same color as their markers. My example plot is shown here:
Can I connect them using the gscatter function?
Please note, I understand that I could loop through a regular plot function and do it that way, but I am wondering if there is a more simple and elegant solution.
Thanks for any help you send my way!
Cheers, Jake

Réponses (1)

Kelly Kearney
Kelly Kearney le 21 Fév 2018
The gscatter function already plots the data as line objects... you just need to add a visible line style:
h = gscatter(...)
set(h, 'linestyle', '-');
  2 commentaires
Jake Warner
Jake Warner le 21 Fév 2018
Absolutely perfect, thank you.
Aseman
Aseman le 9 Août 2021
Thank you. Perfect

Connectez-vous pour commenter.

Catégories

En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by