美文网首页
Matlab legend 终极用法

Matlab legend 终极用法

作者: NoneLand | 来源:发表于2017-11-22 14:45 被阅读61次

用Matlab画图时,对每一条线设置不了legend,一番查找之后,在360文档找到解决方法,如下所示:

image.png
intact = plot(xin, yin,  xi_out, yi_out, 'b');
axis('equal');
hold on;
Rs = Rin:0.005:Rin+(Rout-Rin)*d0;
cd = plot((Rin+(Rout-Rin).*dtheta1).*cos(theta), (Rin+(Rout-Rin).*dtheta1).*sin(theta), 'r', Rs.*cos(beta), Rs.*sin(beta), 'r', Rs.*cos(-beta), Rs.*sin(-beta), 'r');
linear = plot((Rin+(Rout-Rin).*dtheta2).*cos(theta), (Rin+(Rout-Rin).*dtheta2).*sin(theta), 'g');
el = plot((Rin+(Rout-Rin).*dtheta3).*cos(theta), (Rin+(Rout-Rin).*dtheta3).*sin(theta), 'c');
pa = plot((Rin+(Rout-Rin).*dtheta4).*cos(theta), (Rin+(Rout-Rin).*dtheta4).*sin(theta), 'm');
hold off;
legend([intact(1), cd(1), linear, el, pa, l2, l3], 'intact',  'CD', 'Linear', 'EL','PA', 'Location', 'Northwest', '2-order', '3-order');
image.png

相关文章

  • Matlab legend 终极用法

    用Matlab画图时,对每一条线设置不了legend,一番查找之后,在360文档找到解决方法,如下所示:

  • matplotlib-legend()中loc的用法

    python - matplotlib-legend()中loc的用法 matplotlib中的legend主要用...

  • matplotlib可视化篇legend()--图例

    matplotlib.pyplot.legend()用来显示图例,legend基础语法及用法,官方文档 常用参数列...

  • MATLAB|如何去除legend边框

    [toc] 1. 问题描述 MATLAB绘图中,默认的legend设置,总会显示边框,影响图像显示,如何去除呢? ...

  • Python作图简介

    目录 设置作图方式 工具简介MatplotlibSeaborn 基本用法设置坐标轴调整名字和间隔Legend 图例...

  • R语言_legend()函数用法

    前言:微博参与话题 #给你四年时间你也学不会生信# Add Legends to Plots | 图例 Argum...

  • matlab varargin用法

    varargin 就是一个输入 变量,它可以是任意个不定个数的输入参数。要求:第一,指明它用小写的字母表示;第二,...

  • matlab varargout用法

    转载 varargout是一个元胞数组,用来存储输出参数。利用它的好处是输出参数的个数可变,可以根据情况改变输出参...

  • 我的一生模型构建

    一、知识点 1.matplotlib图例legend语法及设置 loc 设置图例位置 其他用法参考 https:/...

  • 2.2展示数据Matpoltlib

    1. 基本使用 基本用法 figure图像 设置坐标轴 调整坐标轴 图例legend 标注annotation 能...

网友评论

      本文标题:Matlab legend 终极用法

      本文链接:https://www.haomeiwen.com/subject/dhinvxtx.html