% 1. Load the data using dlmread
% 'temp_data_01.csv' is the filename
% ';' is the delimiter
% 1, 0 tells Octave to start at row 1, column 0 (skipping the header)
data = dlmread('temp_data_01.csv', ';', 1, 0);

% 2. Separate columns
hours = data(:, 1);
temps = data(:, 2);
humid = data(:, 3);

figure;
% Use '-o' to show the individual hourly measurements
[ax, h1, h2] = plotyy(hours, temps, hours, humid);

grid on;
title('Measured 24-Hour Weather: Santorini (Airport/Oia)');
xlabel('Hour (Local Time)');
ylabel(ax(1), 'Temperature (C)');
ylabel(ax(2), 'Relative Humidity (%)');

% Styling the lines and markers
set(h1, 'LineStyle', '-', 'Marker', 'o', 'Color', [0.8 0.2 0.2], 'LineWidth', 1.5);
set(h2, 'LineStyle', '-', 'Marker', 's', 'Color', [0.2 0.4 0.8], 'LineWidth', 1.5);

set(ax, 'XLim', [0 24], 'XTick', 0:2:24);
legend([h1, h2], 'Observed Temp', 'Observed Humidity');