0

嗨,我有以下代码输出下图。但是我想删除连接绿线上两条曲线的绿色水平线。我怎样才能做到这一点并保持相同的颜色?谢谢

Y = xlsread('hanimaadhoo_sun_path.xls','hanimaadhoo'); % 

azimuth_march_equinox = Y(1:17,1);
 altitude_march_equinox = Y(1:17,2);


 azimuth_september_equinox = Y(1:17,3);
altitude_september_equinox =Y(1:17,4);

azimuth_winter_solstice = Y(1:17,5);
altitude_winter_solstice = Y(1:17,6);

 azimuth_summer_solstice = Y(1:17,7);
altitude_summer_solstice = Y(1:17,8);

figure;
   plot(azimuth_summer_solstice,altitude_summer_solstice,azimuth_winter_solstice,altitude_winter_solstice,...
azimuth_march_equinox,altitude_march_equinox,azimuth_september_equinox,altitude_september_equinox,'LineWidth',2);

在此处输入图像描述

4

1 回答 1

0

您应该将它们绘制为 2 个单独的图。此外,您应该明确定义颜色:

  plot(azimuth_summer_solstice,altitude_summer_solstice,...    azimuth_march_equinox,altitude_march_equinox,azimuth_september_equinox,altitude_september_equinox,'LineWidth',2);
  % Now plot winter in 2 parts!
  n = .... %Something
  plot(azimuth_winter_solstice(1:n), altitude_winter_solstice(1:n),'g','LineWidth',2);
  plot(azimuth_winter_solstice(n+1:end), altitude_winter_solstice(n+1:end),'g','LineWidth',2);

运行前务必填写正确n

于 2012-09-21T16:43:53.157 回答