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
786 stars 222 forks source link

Documentation for modifying axis limits #124

Closed RSKothari closed 1 year ago

RSKothari commented 2 years ago

Dear creator,

First of all, thank you! You are awesome! I absolutely love this tool that you've created and have successfully used it in the past for data analysis.

Could you add examples / tools to change X and Y axes limits manually? It seems it can be done using set(g).facet_axes_handles, {'YLim'}, [0, 0.02]); but it doesn't seem to work for me. Is there a better approach?

RSKothari commented 2 years ago

I managed to find the correct code as g.axe_property('YLim', [0, 0.02]) - it might be a good idea to include such a use case in any of the examples you've provided.

piermorel commented 2 years ago

Thanks for the suggestion, that's indeed a frequent question !

XiaoyuZeng commented 2 years ago

I encountered the same problem today. Surprisingly I did not find any official documentation related to the setting of axis limits in Gramm. Thanks, Rakshit, for saving me from struggling with this issue.