Matlab:使用TabPanel时绘制矩形 [英] Matlab: drawing rectangle when using tabpanel

查看:184
本文介绍了Matlab:使用TabPanel时绘制矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用TabPanel构建我的GUI.问题是,当我绘制矩形时,它显示在轴的外部.不使用TabPanel时不存在问题.

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).

有任何提示吗?

谢谢!

推荐答案

我有好消息,也有坏消息. (整个互联网上都没有答案,我只是看到了像这样的未答复的请求.)

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

我遇到了完全相同的问题.检查后,问题实际上仅限于MARKERS(因此,如果是绘图,则标记未设置为none或散布).如果我仅画线,它将保持剪切状态.

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.

问题是绘图所在的图形的渲染器.您必须将其设置为"painter"或"zbuffer",而不是"openGL".遗憾的是只有后者允许您绘制透明图像:(.我认为Matlab应该解决此问题,以便我们可以在同一图中同时包含未剪切的标记和透明图像...

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.

这篇关于Matlab:使用TabPanel时绘制矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆