matlab - 将图形的一个实例设置为仅在 x 方向上放大
问题描述
我有一个包含图形绘图类的三个实例的图形。我希望其中两个能够在 x 和 y 方向上放大/缩小,并且其中一个实例能够仅在 x 方向上放大。目前我可以将图表设置为能够使用缩放
zoom(obj.Axes, 'on')
这允许在 x 和 y 方向上进行缩放。我希望能够在图形绘图类中使用条件语句更改其中一个图形的缩放特性,如下所示
if strcmp(obj.Type, "Axes3") % obj.Type is a descriptor, set when the instances are created, that I am using to
% differentiate between the graphs, for the other two graphs these would be
% "Axes1" and "Axes2"
zoom(obj.Axes, 'xon');
title(obj.Axes, "Graph 3");
else
zoom(obj.Axes, 'on');
title(obj.Axes, "Other Graphs");
end
但是,当我实现这个时,所有三个图表都设置为仅在 x 方向上放大。我认为这可能是 zoom() 函数为同一图中的所有图形设置缩放属性的结果,而不仅仅是一个实例。令我困惑的是,标题函数成功地为每个图形设置了不同的标题,我在这里省略的 xlabel 和 ylabel 也是如此,但实现方式与标题相同。
关于如何独立设置每个图形的缩放属性的任何想法?
解决方案
推荐阅读
- java - 如何在TestNG框架中将值从一个类传递到另一个类
- python-3.x - 无法捕获 wxDataViewListCtrl 上的双击事件
- laravel - Laravel $middlewareGroups 排除非身份验证路由
- magento - 关于产品复制的触发事件
- r - 管道工创建的 rsconnect 发布 API
- amazon-web-services - 在 AWS Cognito 中使用 AdminCreateUser 创建具有自定义属性的用户
- r - 如何将 map() 与可能 () 一起使用
- javascript - Javascript Filereader 按名称排序
- ansible - 如何限制 Ansible 的设置模块(gather_facts)只检索服务器的主机名,例如?=?
- angular - ng2-google-charts 和加载器 - 错误版本错误