You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I very much hope this is the last time I bother you on here, Pierre. If I may, just a couple more questions:
I have several data points at each of several quantised levels, and I'd like to plot these as a dot plot (before adding other layers on top). The MatlabExchange script I was using previously (Univarscatter) was plotting points situated at the same level equidistantly about a central x value, regardless of the jitter width:
Since I've now migrated all my plotting to gramm, I was hoping to obtain more or less the same with geom_jitter, but I get randomly non-equidistant points:
Reducing the width doesn't help. Is there a way to make the jitter more systematic/symmetrical?
On this scatter plot, I'd like to highlight certain data points by making the marker larger or of a different shape, as in the UnivarScatter plot above. Can this be done, either with gramm or in parallel to it?
Similarly, I'd like to highlight the median on my violin plots. Adding stat_boxplot would be overkill - I'd like to just add a horizontal line (again, as in the plot above). Using Matlab commands ( line() ) prior to g.draw() seems to make a mess.
Thank you so much!
The text was updated successfully, but these errors were encountered:
No bother ;) Though I'm afraid today won't be as useful.
Actually here the answer is easy, but sad : gramm doesn't have this functionality... geom_jitter can only do a random jitter of the points.
That said, since there is some existing file exchange code that does that (and it seems very well documented), it probably wouldn't be overly hard to add as a functionality to gramm as a new geom ! I might check it out myself, but you are welcome to try too... that might be faster !
That's not an easy one for sure. It could be relatively easy to highlight a point by shape by adding a 'shape'argument to gramm as you would with color... but then the problem is that the point is considered separately by all functions (stat_, but also jitter). Using update() could maybe get around the issue for stat_ but that's not super satisfying.
For the median line, stat_boxplot followed by a removal of the box seems to me like the easiest option sadly. Median display is part of stat_summary but it can't draw lines, just points...
Thank you PIerre. It seems to me the best plotting solution (for someone who's not a Matlab pro) is to combine features from various functions, but unfortunately this is exactly what's challenging in this case, given gramm's class/objects which apparently don't easily interface with Matlab plots that are elseway produced.
I think for now I'll just do in gramm what can be done in gramm, and use 'old' methods for all else, rather than try and improve one by means of the other :)
I very much hope this is the last time I bother you on here, Pierre. If I may, just a couple more questions:
Since I've now migrated all my plotting to gramm, I was hoping to obtain more or less the same with geom_jitter, but I get randomly non-equidistant points:
Reducing the width doesn't help. Is there a way to make the jitter more systematic/symmetrical?
On this scatter plot, I'd like to highlight certain data points by making the marker larger or of a different shape, as in the UnivarScatter plot above. Can this be done, either with gramm or in parallel to it?
Similarly, I'd like to highlight the median on my violin plots. Adding stat_boxplot would be overkill - I'd like to just add a horizontal line (again, as in the plot above). Using Matlab commands ( line() ) prior to g.draw() seems to make a mess.
Thank you so much!
The text was updated successfully, but these errors were encountered: