piermorel / gramm

Gramm is a complete data visualization toolbox for Matlab. It provides an easy to use and high-level interface to produce publication-quality plots of complex data with varied statistical visualizations. Gramm is inspired by R's ggplot2 library.
MIT License
784 stars 222 forks source link

Drawing certain data points using a different marker #85

Closed wildetudor closed 5 years ago

wildetudor commented 5 years ago

Dear Pierre,

Is it possible to highlight some data points in a (scatter/violin) plot using a different marker? I created a new plot (based on a variable containing only the data points I wanted to highlight), and drew it on top of the first plot. However, this either replaces the first plot, or makes a mess of the plot's axes etc.

This I guess comes back to a known bug of gramm, the difficulty it has with plotting additional stuff on top of an existing gramm-created plot (see my earlier created issues).

Assuming a bigger update to take care of this general problem is not in store, would you be able to recommend a workaround for the task I've set out to do here?

Many thanks! Tudor

piermorel commented 5 years ago

Hi, sorry for taking so long to answer... You should look into the documentation and examples for the update() function, which is designed to do exactly what you want to do.