Hello all,
I have a problem in changing the line property of a line plot.
I have to change the following script in MAtlab to one compatible with python.
I am reading some csv file .
clear all
info=load(‘3.csv’);
dup = 0;
x = info(:,1);
c = info(:,4);
y_start = info(:,6);
y_end = info(:,7);
lent = info(:,8);
y_seq = info(:,5);
yn_after = info(:,10);
yn_before = info(:,9);
yr_before = info(:,11);
yr_after = info(:,12);
N = length(x);
c0 = 0;
c1 = 0;
M=N;
for i=1:M,
h=line([t(i), t(i)], [Y_start(i), Y_end(i)]); %how to handle this line to python
set(h, ‘LineWidth’, 5)
if
(c(i)==0),
set(h, ‘color’, ‘black’);
elseif (c(i)==1),
set(h, ‘color’, ‘red’);
else
set(h, ‘color’, ‘cyan’);
end
end
plot(x(1:M), y_after(1:M), ‘g’)
plot(x(1:M), y_after(1:M), ‘r’)
xlabel('time ');
ylabel(‘sequence’);