如何防止MATLAB GUI中的LATEX标签变得模糊? [英] How to prevent LATEX-labels in MATLAB GUI to become blurry?

查看:322
本文介绍了如何防止MATLAB GUI中的LATEX标签变得模糊?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我当前的MATLAB GUI项目中,我有两个轴对象.解决方法"uibutton" (我不使用GUIDE)以显示LaTeX公式(据我所知,只有轴标签才能使用LaTeX,而普通的静态文本字段则不能...).另一个轴对象用于实际绘制3D功能.

Within my current MATLAB GUI project, i have two axes objects. The first is used by the workaround "uibutton" (I don't use GUIDE) in order to display a LaTeX-formula (as far as I know, only axes labels are capable to use LaTeX whereas normal static text fields aren't...). The other axes object is used to actually plot a 3D-function.

程序具有以下步骤:

  1. 第一个轴创建LATEX公式(例如f(x)=).
  2. 用户在LaTeX公式之后在编辑字段中输入函数(例如f(x)= a + b).
  3. 用户按下绘图"按钮.
  4. 在第二个轴对象中绘制了3D功能.

问题:

一旦绘制了3D函数,绘制精美的LaTeX格式就会变得清晰.有什么办法可以防止这种情况的发生?

As soon as the 3D-function is plotted, the nicely rendered LaTeX-formular becomes crisp. Is there any way to prevent this from happening?

http://i42.tinypic.com/348pq2u.png (请参见图片)问题演示)

http://i42.tinypic.com/348pq2u.png (See picture for problem demonstration)

推荐答案

在绘制3D图之前和之后检查图形属性

Check your figure properties before and after you draw the 3D plot

get(gcf, 'renderer')

我的猜测是,绘制3D函数会将渲染器从默认设置("painters")更改为另一个渲染器(可能是OpenGL). Matlab的Latex渲染似乎不能与zbuffer或OpenGL配合使用(它们生成位图而不是线条图).

My guess is that plotting the 3D function changes the renderer from the default ("painters") to another (likely OpenGL). Matlab's Latex rendering does not seem to play well with zbuffer or OpenGL (these produce bitmaps rather than line art).

如果画家无法正确渲染3D图形,您可能会被卡住,但是您可以尝试通过将渲染器手动设置回画家来强制使用它

You may be stuck if painters can't render your 3D graphics properly, but you can try to force it by setting the renderer manually back to painters

set(gcf, 'renderer', 'painters')

这篇关于如何防止MATLAB GUI中的LATEX标签变得模糊?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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