이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
how do use patch in the background?
조회 수: 5 (최근 30일)
이전 댓글 표시
Liang Zhan
2011년 4월 8일
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,
LZ
답변 (1개)
Liang Zhan
2011년 4월 8일
댓글 수: 14
Liang Zhan
2011년 4월 8일
------------------------------------------------------------------------
Segmentation violation detected at Fri Apr 8 14:33:43 2011
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.4.0.287 (R2007a)
MATLAB License: 95863
Operating System: Linux 2.6.9-89.0.9.ELsmp #1 SMP Mon Aug 24 07:59:15 EDT 2009 x86_64
GNU C Library: 2.3.4 stable
Window System: No active display
Current Visual: None
Virtual Machine: Java 1.5.0_04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
Default Charset: US-ASCII
Register State:
rax = 0000000001583040 rbx = 0000000000bf46b0
rcx = 3ff0000000000000 rdx = 0000000000000000
rbp = 0000007fbfe00010 rsi = 0000000001583040
rdi = 0000002a9dcc4a60 rsp = 0000007fbfdffff0
r8 = 0000000000000000 r9 = 0000000000000009
r10 = 0000007fbfff5701 r11 = 0000002a98cafa90
r12 = 0000002a9dcc4a60 r13 = 0000002a9dcc4a60
r14 = 0000007fbfff5970 r15 = 0000000000000000
rip = 0000002a9a9ea7d3 flg = 0000000000010206
Stack Trace:
[0] libmwhardcopy.so:psStringDescent(105, 0, 0x00bf46b0, 0x2a9dcc4a60) + 99 bytes
[1] libmwgui.so:wm_StringDescent(WinRec_tag*)(0, 0, 0x00bf46b0, 0x2a9dcc4a60) + 86 bytes
.....
Walter Roberson
2011년 4월 8일
I ran the code with XX, YY, ZZ, and C each set to different rand(1,53), and had no problems in 2008b on Linux-64.
Liang Zhan
2011년 4월 8일
yes, in normal, this code is fine, and has no problem,
but I run this code in unix "background",and it come out these errors.
Liang Zhan
2011년 4월 8일
lzhan@cerebro-lsh4.data.cluster.loni.ucla.edu[31]% matlab
Warning: Unable to open display , MATLAB is starting without a display.
You will not be able to display graphics on the screen.
< M A T L A B >
Copyright 1984-2007 The MathWorks, Inc.
Version 7.4.0.287 (R2007a)
January 29, 2007
Warning: Name is nonexistent or not a directory: /usr/lshare/prog/pub/spm/spm2.
Warning: Name is nonexistent or not a directory: /usr/lshare/prog/pub/spm/spm2.
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
>> ODF_plot
then it come out those error message
Walter Roberson
2011년 4월 8일
Undefined function or variable sphere_tri
The missing mask.mat and ack1.mat are also going to cause problems for other people wishing to debug your code.
Walter Roberson
2011년 4월 8일
I tried switching to
set(h,'Renderer','painters')
in my sample code. It is taking a long time to execute; hard to say yet ha terminate.
Liang Zhan
2011년 4월 8일
let me test in my side.
where should I add set(h,'Renderer','painters')?
just before
saveas(h,'figure_test_no_display.jpg')?
thanks,
Liang Zhan
2011년 4월 8일
it shows error
Warning: RGB color data not yet supported in Painter's mode.
> In /usr/local/matlab-7.4-1_64bit/toolbox/matlab/graphics/private/render.p>render at 144
In print at 267
In saveas at 159
In ODF_plot at 89
Warning: RGB color data not yet supported in Painter's mode.
> In /usr/local/matlab-7.4-1_64bit/toolbox/matlab/graphics/private/render.p>render at 144
In print at 267
In saveas at 159
In ODF_plot at 89
Warning: RGB color data not yet supported in Painter's mode.
> In /usr/local/matlab-7.4-1_64bit/toolbox/matlab/graphics/private/render.p>render at 144
In print at 267
In saveas at 159
In ODF_plot at 89
Liang Zhan
2011년 4월 8일
Wow~, it works very well, thanks a lot for your suggestion. It solved me a big problem, appreciate!!!
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)
