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

[f,epoly,ey1,ey2]=BetweenCurves(-t,-xu(2,1:n),-xu(3,1:n),'Handle',f,'axis',a,
'foreground', 12 ) // for each interval

plot (-t,-xu(2,1:n),'b-o',..
  -t,-xu(3,1:n),'b-o',..
  -t,-xu(4,1:n),'b-o',.. etc





--
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-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):
[epoly,ey1,ey2]=BetweenCurves(-t,-xu(2,1:n),-xu(3,1:n)) // x=time,
y=subsidence

Sure it is something to do with the figure (f) and axes (a) handles.

Could you clarify where things go.

Many thanks

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-07 Thread CRETE Denis
Hello, I did not look carefully at the function "BetweenCurves", but it 
requires y1 and y2 to share the same x data. Isn't it a limitation ? Would it 
be useful to extend it to the case where x1 and x2 are not identical ?
Best regards
Denis
-Message d'origine-
De : users  De 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-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 07/04/2021 10:57, CRETE Denis wrote:
> 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 
> Envoyé : mercredi 7 avril 2021 09:26 À : users@lists.scilab.org Objet 
> : [Scilab-users] Filled polygons from polylines
>
> 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 filled polygons (similar to attached image)?
>
> I am not sure how it is possible from the existing code to close the output 
> result used in the plot function to create a closed polygon. Essentially it 
> needs extra points otherwise you would just tie the end point and start point 
> of the polyline.
>
> It would be good to get some other ideas and whether it is actually possible. 
> Original code was in Matlab and had all of the data within the script, so I 
> took that out and stored in a separate data file for ease of use.
>
> Thanks for any suggestions.
>
> Lester
>
> Backstrip_1D_v1.sce
> 
> A1-NC198.csv 
> 
> Backstrip_1D_filled-plot.jpg
>  jpg>
>
>
>
> --
> Sent from: 
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f26
> 02246.html ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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 07/04/2021 10:57, CRETE Denis wrote:

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
Envoyé : mercredi 7 avril 2021 09:26
À : users@lists.scilab.org
Objet : [Scilab-users] Filled polygons from polylines

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 filled polygons (similar to attached image)?

I am not sure how it is possible from the existing code to close the output 
result used in the plot function to create a closed polygon. Essentially it 
needs extra points otherwise you would just tie the end point and start point 
of the polyline.

It would be good to get some other ideas and whether it is actually possible. 
Original code was in Matlab and had all of the data within the script, so I 
took that out and stored in a separate data file for ease of use.

Thanks for any suggestions.

Lester

Backstrip_1D_v1.sce

A1-NC198.csv 
Backstrip_1D_filled-plot.jpg




--
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
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


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
Envoyé : mercredi 7 avril 2021 09:26
À : users@lists.scilab.org
Objet : [Scilab-users] Filled polygons from polylines

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 filled polygons (similar to attached image)?

I am not sure how it is possible from the existing code to close the output 
result used in the plot function to create a closed polygon. Essentially it 
needs extra points otherwise you would just tie the end point and start point 
of the polyline.

It would be good to get some other ideas and whether it is actually possible. 
Original code was in Matlab and had all of the data within the script, so I 
took that out and stored in a separate data file for ease of use.

Thanks for any suggestions.

Lester

Backstrip_1D_v1.sce

A1-NC198.csv 
Backstrip_1D_filled-plot.jpg
  



--
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
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Filled polygons from polylines

2021-04-07 Thread arctica1963
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 filled polygons (similar to attached image)?

I am not sure how it is possible from the existing code to close the output
result used in the plot function to create a closed polygon. Essentially it
needs extra points otherwise you would just tie the end point and start
point of the polyline.

It would be good to get some other ideas and whether it is actually
possible. Original code was in Matlab and had all of the data within the
script, so I took that out and stored in a separate data file for ease of
use.

Thanks for any suggestions.

Lester

Backstrip_1D_v1.sce
  
A1-NC198.csv   
Backstrip_1D_filled-plot.jpg
  



--
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