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

Reordering x-values in stat_summary #96

Open PierreP92 opened 4 years ago

PierreP92 commented 4 years ago

Hi Pierre,

the default behaviour of stat_summary('geom','line') is to link points according to ascending values of x. Sorry if this is a silly question but is there an easy way to link them according to a third variable instead?

Thanks a lot, Pierre

piermorel commented 4 years ago

Hi homonym @PierreP92 ,

Thanks for the feedback. You can reorder the x axis if it's categorical, but it doesn't seem to be what you have in mind ! You want the ability to have a line that loops back on itself (i.e. something that stops being a function anymore), is that right ? That is a good suggestion, but a very big one! For now I would suggest to use the function to generate the error bars with points, and then link them with a line in the order you want "by hand"... Kind of related to #72