Clear Filters
Clear Filters

External graphics in GUI

4 views (last 30 days)
Jakob Sørensen
Jakob Sørensen on 8 Mar 2012
Hey there,
I'm creating a GUI, and I was wondering if it was possible to add external graphics (static) without adding an axes for every simple object I wan't to add. More specific I would like to add some horizontal and vertical lines, to split the GUI into different "cells", that way (hopefully) making it a bit more intuitive. Is this possible somehow?

Accepted Answer

Jacob Halbrooks
Jacob Halbrooks on 8 Mar 2012
Line annotations can be added directly to a figure. For example, this code adds a couple of lines to divide a figure into 4 squares:
f=figure;
annotation('line', [0 1], [0.5 0.5]);
annotation('line', [0.5 0.5], [0 1]);
See the help for ANNOTATION to inspect the different types of annotations you can add.
You might also consider laying out your GUI with uipanels, which can have visible borders and can be a good way to contain graphics.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!