필터 지우기
필터 지우기

External graphics in GUI

조회 수: 4 (최근 30일)
Jakob Sørensen
Jakob Sørensen 2012년 3월 8일
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?

채택된 답변

Jacob Halbrooks
Jacob Halbrooks 2012년 3월 8일
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.
  댓글 수: 1
Jakob Sørensen
Jakob Sørensen 2012년 3월 8일
Awesome! Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by