how do use patch in the background?

10 views (last 30 days)
Liang Zhan
Liang Zhan on 8 Apr 2011
I know matlab has patch function, which is patch(X,Y,Z,C) creates a patch in 3-D coordinates. If the coordinate data does not define closed polygons, patch closes the polygons. The data can define concave or intersecting polygons. However, if the edges of an individual patch face intersect themselves, the resulting face might be only partly filled. In that case, it is better to divide the face into smaller polygons.
I can use it to plot my figure normally, but the question is I need to do this work in the background (something like use patch to plot the figure(no display), then save the figure as jpg or eps in the background, then only display the jpg or eps.)
can anyone help me? Thanks,

Answers (1)

Liang Zhan
Liang Zhan on 8 Apr 2011
I run the code in unix background, and the main code is:
for i=1:256
for j=1:256
patch(XX, YY, ZZ,C,'LineStyle', 'none');
then it come out a very long error message, which I can not post here.
Liang Zhan
Liang Zhan on 8 Apr 2011
Wow~, it works very well, thanks a lot for your suggestion. It solved me a big problem, appreciate!!!

Sign in to comment.


Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by