writing/exporting a plot into a file

조회 수: 1 (최근 30일)
Ian Bunker
Ian Bunker 2021년 5월 12일
댓글: Walter Roberson 2021년 7월 28일
Hi,
I currently have a program that uses the plot function to generate a graph. I would like to write the graph into a document. I am very new to matlab and coding in general, and so far have been unable to locate the relevant documentation.

채택된 답변

Walter Roberson
Walter Roberson 2021년 5월 12일
  댓글 수: 2
Ian Bunker
Ian Bunker 2021년 5월 12일
편집: Ian Bunker 2021년 5월 12일
These links have been really helpful, I also have been looking at the ones mentioned here about putting multiple pdfs into one document. https://www.mathworks.com/matlabcentral/answers/745882-multiple-plots-to-one-pdf
You may be able to clarify something,
When I plot something say plot(x, y) I get a figure (graph that I can view), but as far as I understand plot(x, y) is not an obj. Since an obj is any type of axes, figure, etc. Therefore something like
exportgraphics(plot(x, y), 'filenamehere.pdf');
is invalid (to my understanding).
If I had two columnar vectors (arrays) x and y and I wanted to use export graphics I would need to somehow turn them into an obj (a broad term). What type of function or command would I utilize to accomplish this?
Walter Roberson
Walter Roberson 2021년 7월 28일
plot() returns an array of "primitive chart line" objects. Surfaces, images, lines, patches, text, are the traditional low level objects; there are now a lot of additional low level objects built around a new layer of even lower level objects

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

추가 답변 (0개)

카테고리

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