matlab 双坐标折线图画法

%%各时段电量需求
clc
close all
clear all
cost_gd = [2200 1800 3800 4600];
cost_bj = [2.7 2.2 1.8 3.6];
cost_qd = [4000 1500 2500 1000];
fontsize = 24;
axes('Parent',figure,'FontSize',fontsize);
t=1:length(cost_gd);
yyaxis left ;
ylim([0,5000]);
xlim = ([-2,6]);
plot(t,cost_gd,'ro-',t,cost_qd,'b*-','LineWidth',2)
ylabel('固定成本/启动成本');
tick = {'型号1' ''  '型号2' '' '型号3' '' '型号4'};
set(gca,'XTickLabel',tick)
yyaxis right;
ylim([0,5]);
xlim = ([-1,5]);
plot(t,cost_bj,'gx-','LineWidth',2);
ylabel('边际成本');
title('各型号发电机成本对比')
xlabel('各型号发电机')
legend('固定成本(单位:元/小时)','启动成本(单位:元/次)','边际成本(单位:元/小时)')
legend('Location','NorthWest')

39c33e5c514687e2.png

转载于:https://www.cnblogs.com/gshang/p/11193691.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值