HaWa
HaWa

Reputation: 229

Plotting Hours in X axis MATLAB

I need to plot TP vs time. I have the following data extracted from Excel:

y-axis    x axis
28.72   13:02:55.58
28.21   13:08:49.53
23.32   13:14:43.48
28.85   13:20:34.48
28.84   13:26:28.51
28.37   13:32:22.51
28.75   13:38:16.49
26.85   13:44:10.55
25.99   13:50:03.51
27.65   13:55:55.54
5.99    14:01:48.51
11.28   14:07:26.52
16.15   14:13:10.56
15.19   14:18:57.49
24.32   14:24:44.50
26.13   14:30:36.49
27.92   14:36:29.53
17.96   14:42:22.54
10.08   14:48:10.54
14.73   14:53:54.52
18.12   14:59:41.48

I have some TP in Mbps on the Y-axis and time in the HH:MM:SS format on the X-axis. How can I set the tick marks on the X-axis to use the time?

Upvotes: 0

Views: 706

Answers (1)

Adriaan
Adriaan

Reputation: 18177

Use datetick

datetick('x',HH:MM:SS) %// use required DateFormat, see docs

Upvotes: 2

Related Questions