what is the syntax for this line in matlab, h=line([x1,x2],[y1,y2]) in python?.
Note: forwarded message attached.
       
---------------------------------
Pinpoint customers who are looking for what you sell. 
--- Begin Message ---
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');

       
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. 

--- End Message ---
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to