Matlab: drawing rectangle when using tabpanel

孤者浪人 提交于 2019-12-13 18:02:09

问题


I'm using TabPanel for building my GUI. The problem is, that when I'm drawing rectangle it appears outside of my axes. Problem does not exist when not using TabPanel.

I was testing 'clipping' parameter, but my object is still outside axes (fig).

Any hints?

thanks!


回答1:


I have good news and bad news. (There is no answer all over the internet, I just saw unanswered requests like this one).

I had exactly the same problem. After checking, the problem is actually restrained to MARKERS (so either marker not set to none in the case of plots, or scatters). If I only plot lines, it stays clipped.

The issues is the renderer of the figure in which your plot is. You have to set it to "painter" or "zbuffer" and not "openGL". Sadly only the latter lets you plot transparent images :( . I think Matlab should fix this issue so we can have both unclipped markers and transparent images in the same figure...

K>> get(handles.output,'Renderer')
ans =    
OpenGL
K>> set(handles.output,'Renderer','painter')

Yanis

edit: the solving might be similar for rectangles I hope.



来源:https://stackoverflow.com/questions/10119180/matlab-drawing-rectangle-when-using-tabpanel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!