Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Many thanks Antoine Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread Antoine Monmayrant
On 14/04/2021 14:21, arctica1963 wrote: Sorry, I did not make it clear. Instead of the following which updates the existing graphic to generate the final plot (y1 to y10); plot(-[t(n) t], [0 y1]) plot(-[t(n) t], [0 y2]) plot(-[t(n) t], [0 y3]) plot(-[t(n) t], [0 y4]) plot(-[t(n) t], [0 y5])

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Sorry, I did not make it clear. Instead of the following which updates the existing graphic to generate the final plot (y1 to y10); plot(-[t(n) t], [0 y1]) plot(-[t(n) t], [0 y2]) plot(-[t(n) t], [0 y3]) plot(-[t(n) t], [0 y4]) plot(-[t(n) t], [0 y5]) plot(-[t(n) t], [0 y6]) plot(-[t(n) t], [0

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread Antoine Monmayrant
Hello Lester, On 14/04/2021 12:17, arctica1963 wrote: Is there a way to do a loop over the curves to save multiple plots What do you want to do exactly? Do you want to get several image files with only part of the lines or surfaces visible? Because you can do that by playing with the

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Truncated plot at t=97 -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Hi Samuel, Sorted out the code and it works.Had to manually set the filled areas upper time limit (t=97) (plot(-[97 t], [0 y1]) ). Set two graphic handles for upper and lower plot. Just random colours to test! Is there a way to do a loop over the curves to save multiple plots Thanks Lester

Re: [Scilab-users] Filled polygons from polylines

2021-04-13 Thread arctica1963
Hi Samuel, Thanks for the suggestion. I have not managed to get it working with the existing code as it generates an invalid index error; not sure what is going on. I tidied up the file for clarity. Following your example, plot(x, [0 y3 0]) would be plot(-t, [0 -xu(1,1:n) 0] ) in this code, but

Re: [Scilab-users] Filled polygons from polylines

2021-04-09 Thread Samuel Gougeon
Or better, to avoid artfefacts on boundaries: y = rand(1,20); y2 = rand(1,20)+1; y3 = rand(1,20)+2; x = [1 1:20 20]; clf, plot(x, [0 y3 0]) plot(x, [0 y2 0]) plot(x, [0 y 0]) gca().children.children.fill_mode= "on" gca().children.children.background= [color("grey30");

Re: [Scilab-users] Filled polygons from polylines

2021-04-09 Thread Samuel Gougeon
Le 07/04/2021 à 09:25, arctica1963 a écrit : Hello, I have script that reads a csv file containing the data and uses that to calculate subsidence from well information. This all works fine, but it is not the best way to display the result. Is it possible to take the polyline output and generate

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread arctica1963
Think I spotted it... figure(1), clf f=gcf(); f.figure_size=[1024,800]; f.figure_name = "Subsidence of the Kufrah Basin Well A1-NC198"; f.background=8 // white background title ('Subsidence of the Kufrah Basin Well A1-NC198') // Figure title subplot (2,1,1) a=gca(); a.font_size=3

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread arctica1963
Hello Antoine, Your code does seem to work since the x locations are constant for each curve. However, I cannot see where exactly to apply the code for each layer within my existing code and how to apply different fill colours. This works to fill between the 2nd and 3rd polylines (see image):

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread CRETE Denis
la part de Antoine Monmayrant Envoyé : mercredi 7 avril 2021 11:16 À : users@lists.scilab.org Objet : Re: [Scilab-users] Filled polygons from polylines Hello all, I think I answered this question before on this mailing list... Ah, yes I did: http://mailinglists.scilab.org/Reg-Area-Between-

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread Antoine Monmayrant
Hello all, I think I answered this question before on this mailing list... Ah, yes I did: http://mailinglists.scilab.org/Reg-Area-Between-two-curves-td3393261.html#a4026721 Get the source for "[h,epoly,ey1,ey2]=BetweenCurves(x,y1,y2,varargin)" in the thread. Hope it helps, Antoine On

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread CRETE Denis
Hello, The filled area is defined by 2 curves apparently; one is the top border and one is the lower border. Is it possible to construct a closed polygon using the points of both curves (something like C=[C1;C2] ) ? HTH Denis -Message d'origine- De : users De la part de arctica1963