Problems with the patch transparency in a GUI

3 ビュー (過去 30 日間)
Ralph
Ralph 2013 年 11 月 24 日
回答済み: Walter Roberson 2013 年 11 月 24 日
I have a weird problem using the patch tool. When I try to plot a transparent patch on an image in my GUI, it doesn't work, I mean, the patch doesn't become transparent. But when I do the same out of my GUI (in the Matlab command line), it works perfecty. What am I doing wrong?? Thanks
The code that i'm using is very simple:
function push_Callback(hObject, eventdata, handles)
% hObject handle to push_converter (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user table_data (see GUIDATA)
global x; global y;
axes(handles.axes2);
im=imshow(handles.imag);
pat=patch(x,y,'r','FaceAlpha',0.1);

採用された回答

Walter Roberson
Walter Roberson 2013 年 11 月 24 日
Somehow your figure Renderer property has been forced to not be OpenGL in the GUI. Transparency requires OpenGL.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by