Download
hgx.m
See also New graphics in Matlab 2014b and 2015 and creating nicer figures in one line of code for ng.m and og.m
The new graphics system in Matlab 2014b makes creating publication quality graphs much easier, but it still requires a little effort. See ng.m and og.m for two handy functions to improve the appearance of plots within Matlab. However, another important consideration is how to get the figure out of Matlab without ruining it. This function, hgx, is a handler for Matlab's various save/export functions and is designed to facilitate saving in useful forms using as little typing as possible
Leader
Showing posts with label Handles. Show all posts
Showing posts with label Handles. Show all posts
Monday, 31 August 2015
Sunday, 22 March 2015
New graphics in Matlab 2014b and 2015 and creating nicer figures in one line of code
Download
og.m
ng.m
see also Matlab plot formats and how to quickly save high quality figures for hgx, a function to handle exporting figures.
The new graphics system in Matlab 2014b has a few handy features, including:
og.m
ng.m
see also Matlab plot formats and how to quickly save high quality figures for hgx, a function to handle exporting figures.
The new graphics system in Matlab 2014b has a few handy features, including:
- Perceptually-equally spaced default colours (although be careful, red is near green)
- OpenGL hardware rendering - smooth lines!
- Easier access to handle properties using structure syntax - eg. handle.FontSize = 12, instead of set(handle, 'FontSize', 12).
Even so, it still takes a little bit of effort to render nice figures and graph in Matlab, the default settings don't look great. Generally lines need to be made thicker, fonts bigger, etc., etc. Each setting requiring a line of code. Also, OpenGL can be a bit unreliable; it switches to software rendering on a whim, which disables features like anti-aliasing.
Subscribe to:
Posts (Atom)