I'm new to Scilab. I'd like to know how to draw a vertical line on a plot with Scilab. Here is a simple test figure with 3 plots with the same time on the x axis. I'd like to mark some parts of it on the x axis and draw a vertical line at 30 and 50 on the three plots.

The plots are generated with:

my_data=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110; 1.159603, 1.157602, 1.155597, 1.156586, 1.151569, 1.149546, 1.147516, 1.145478, 1.143435, 1.141386, 1.139331; -12.178548, -12.148279, -12.117892, -12.137811, -12.057639, -12.027437, -11.997208, -11.966981, -11.93675, -11.906536, -11.876309; 0.779645, 0.778119, 0.776596, 0.779167, 0.773745, 0.772321, 0.770819, 0.769353, 0.767894, 0.766536, 0.765285]'

f=scf();

subplot(3,1,1);

plot2d(my_data(:,1), my_data(:,2))

subplot(3,1,2);

plot2d(my_data(:,1), my_data(:,3))

subplot(3,1,3);

plot2d(my_data(:,1), my_data(:,4))

Thanks.

]]>You can plot a vertical line by assigning two points. Please add the following lines between plot2d and subplot in your code (for all three plots), and you will see two vertical lines at x=30 and 50 in each graph

a = f.children(1);

plot([30, 30], [a.y_ticks.locations(1), a.y_ticks.locations($)])

plot([50, 50], [a.y_ticks.locations(1), a.y_ticks.locations($)])

Mizue

]]>