필터 지우기
필터 지우기

Unable to copy plot3 image as vector

조회 수: 11 (최근 30일)
Ahmed Rehan
Ahmed Rehan 2023년 11월 5일
답변: Shreshth 2023년 11월 23일
Hi there,
I'd like to use an image for editing in Illustrator, and it works perfectly when the image is in 2D format. I utilize the metafile option for the clipboard, and it functions seamlessly for 2D images. However, when attempting to use the same approach with a 3D plot generated using the plot3() command, it doesn't seem to work as expected. Could you please provide some guidance or assistance to resolve this issue? Thank you!
  댓글 수: 1
Cedric Kotitschke
Cedric Kotitschke 2023년 11월 16일
이동: Dyuman Joshi 2023년 11월 16일
What exactly does not work?
This works for me
phi = 0:0.01:5*pi;
x = cos(phi);
y = sin(phi);
z = linspace(1,10,numel(phi));
plot3(x,y,z)
exportgraphics(gcf, 'myplot.pdf', 'ContentType', 'vector')

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

답변 (1개)

Shreshth
Shreshth 2023년 11월 23일
Hello Ahmed,
When using MATLAB to copy 3D plots to other software like Illustrator, there are a few considerations to keep in mind. The issue you are encountering is due to the difference in handling 3D data compared to 2D data.
To copy a 3D plot from MATLAB to Illustrator, you can follow these steps:
1.Exporting 3D Plot as an Image File:
Instead of using the clipboard, you can export the 3D plot as an image file directly from MATLAB. This can be done using the saveas function. For example:
figure;
% Create your 3D plot using plot3() command
plot3(x, y, z, 'b', 'LineWidth', 2);
% Save the plot as an image file
saveas(gcf, '3D_plot.png');
Replace x, y, and z with your actual data and adjust the plot settings as needed.
2.Importing the Image into Illustrator:
After saving the image file, you can import it into Adobe Illustrator using the "File" > "Place" option. This will allow you to use the 3D plot in your Illustrator project.
3.Using MATLAB's Simulink 3D Animation:
If you want to work with interactive 3D content, you can consider using MATLAB's Simulink 3D Animation capabilities. Simulink 3D Animation provides tools to create and animate 3D scenes, which can be exported to various formats for use in other applications.
By following these steps, you should be able to effectively use 3D plots from MATLAB in Adobe Illustrator.
You can also refer to MATLAB’s documentation for exporting graphics at the below link.
Thank you,
Shubham Shreshth.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by