How to rasterize only certain parts of the figure?

조회 수: 18 (최근 30일)
Dillon
Dillon 2022년 8월 7일
답변: Theo Michelis 2023년 11월 6일
I have created a 3D surface plot in Matlab. I want to export the 3D surface as an image (because exporting it as vector graphics makes the file size too big), and keep the rest of the figure (e.g. axis labels, numbers, axes, etc) as vector graphics. Is this possible? In matplotlib, this can be done using
ax.plot_surf(data, rasterized=True) % matplotlib example
fig.savefig('test.pdf', dpi=500)
But I'm not sure what to do in Matlab. Any help is appreciated. Thanks.

답변 (2개)

Theo Michelis
Theo Michelis 2023년 11월 6일

Narvik
Narvik 2023년 9월 18일
Hi,
I understand that you want to rasterize certain parts of your 3D plot.
The vercast function might be helpful in rasterizing part of a plot. Unfortunately, the function is no longer present on the MATLAB File Exchange. I found a GitHub repository that contains the source code for the function. You can review the code and leverage it as a reference to create your own function.
Please find the link to the function on GitHub below:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by