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

how to set_order_options for facet_grid? #43

Closed janawrosch closed 7 years ago

janawrosch commented 7 years ago

The gramm_examples show how to change the order of e.g. bars with the line set_order_options('x', {x_label_order}) This works perfectly for ordering x-values, color and lightness.

But with what do I replace the 'x' if I want to change the order of subplots in a facet_grid?

Example: g(2,1)=gramm('x', data.x_values); g(2,1).facet_grid(data.condition,[]); g(2,1).stat_bin(); g(2,1).set_order_options( ???__ , {condition_label_order});
This produces little "subplots" of the data split up by the condition and they are currently in ascending order and I would like to have them in a given order.

It would be great if anyone could help me with that. Thank you so much!!

piermorel commented 7 years ago

This is documented both in the function itself (doc gramm then click on set_order_options), and in the cheat sheet pdf. Short answer: same as 'x', 'color', etc., the function also takes 'row' and 'column' name value pairs just for this :)

janawrosch commented 7 years ago

Ah, I see, sorry. Thank you!

Von: Pierre Morel [mailto:notifications@github.com] Gesendet: Montag, 3. Juli 2017 17:22 An: piermorel/gramm Cc: Wrosch, Jana; Author Betreff: Re: [piermorel/gramm] how to set_order_options for facet_grid? (#43)

This is documented both in the function itself (doc gramm then click on set_order_options), and in the cheat sheet pdf. Short answer: same as 'x', 'color', etc., the function also takes 'row' and 'column' name value pairs just for this :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/piermorel/gramm/issues/43#issuecomment-312674214, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALmxYypK4RweDxBVMsFtBIBFZLrIRG9cks5sKQcHgaJpZM4OMagB.