필터 지우기
필터 지우기

SAVE and USE plotting TEMPLATE

조회 수: 15 (최근 30일)
Philip Hoskinson
Philip Hoskinson 2017년 11월 21일
답변: Walter Roberson 2017년 11월 21일
I need to use the same plotting template (fonts etc) for dozens of graphs in a paper: how do I create a template so that I don't have to manually change every detail every time (add axis labels etc).

답변 (1개)

Walter Roberson
Walter Roberson 2017년 11월 21일
MATLAB does not have plot templates.
The easiest way to do what you need is to create a function to do the plotting for you, passing in only the changing parts of the data and labeling.
The closest you can get to plot templates would be to plot something the way you want and then to savefig() the figure as a .fig file. Then you would openfig() the file when you needed it and copyobj() the contents into the place you figure needed to use it. Then you would locate the handles of the graphics objects you needed to change, and set their XData and YData and whatever else was needed to update them from the old data to the new data.... but using a function to do the plotting would probably be easier.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by