Hello Mat

 找回密码
 立即注册
查看: 4901|回复: 0

单独设置y轴显示范围,设置x轴为显示时间

[复制链接]

1323

主题

1551

帖子

0

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22647
发表于 2017-3-2 21:48:57 | 显示全部楼层 |阅读模式
  1. clc,clear,close all
  2. warning off
  3. format longG
  4. tic
  5. % web('halcom.cn') % 参考网站
  6. % 总负荷
  7. Psum = [95,90,105,108,110,120,135,145,155,165,160,180,160,150,140,148,158,168,188,210,225,209,180,160,100]-5;
  8. figure(1),plot(Psum,'b.-');hold on
  9. % 电负荷
  10. Pt = [55,48,50,52,55,65,68,75,80,82,81,95,80,80,78,76,78,85,95,100,95,90,80,70,60];
  11. plot(Pt,'m.-');
  12. % 冷负荷
  13. PD = [35,35.5,36,35.5,35.3,35.2,35,37.5,38,39.5,45,46.5,43,42.5,40,44.3,44.8,45.3,46,47,46.5,46,45.5,45,44];
  14. plot(PD,'g*-');
  15. % 热负荷
  16. WD = [43,39,46,43,46,56,59,66,71,73,72,78,71,71,69,67,69,73,78,85,80,75,70,58,55];
  17. plot(WD,'rs-');
  18. grid on;axis tight;
  19. xlabel('时刻');ylabel('负荷/kW');
  20. set(gcf,'position',[300,200,700,400])
  21. set(gca,'XTickLabel',{'1:00','5:00','10:00','15:00','20:00','24:00'},'XTick',[1 5 10 15 20 25])
  22. set(gca,'ylim',[0,250]);  % 设置y轴显示范围
  23. hold off;
复制代码
算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-11-25 20:57 , Processed in 0.212096 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表