plotyy wrong x tick for second dataset

i have 2 datasets that are both on th same x axis (time). the plot however shows the second dataset shrunk on the x-axis. with the datacursor i varifide that it still has the good x tick but it shows on the wrong place within the plot.
as seen in the picture the x from the point does not mach the x axis.
hope some one can help

2 件のコメント

Walter Roberson
Walter Roberson 2016 年 2 月 5 日
Please show the code you used to create this, along with any other calls to graphics routines such as "axis" before you display the plot.
NCC1701JR
NCC1701JR 2016 年 2 月 5 日
編集済み: Walter Roberson 2016 年 2 月 5 日
This is all the code used for plots:
figure;
[AX,hLine1,hLine2] = plotyy(Electrical.Time3,Electrical.P_Battery,Electrical.Time3,Electrical.E_BatteryPlot);
title('power from battery vs cumulative enegry');
xlabel('Time [s]'); ylabel(AX(1),'Power [W]'); ylabel(AX(2),'Energy [kWh]');

回答 (1 件)

NCC1701JR
NCC1701JR 2016 年 2 月 5 日

0 投票

For some reason the plot shows perfect after i restarted matlab to work on it today.
thanx for helping out

この質問は閉じられています。

質問済み:

2016 年 2 月 4 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by