[scilab-Users] Reg :: Area Between two curves
Samuel Gougeon
sgougeon at free.fr
Tue Oct 4 22:41:25 CEST 2011
Le 04/10/2011 15:47, Sumit Adhikari a écrit :
> Hello All,
>
> If I have two curves then how do I shade the area between two curves
> in scilab.
>
> I am plotting data files and using scilab plot function.
There are at least 4 ways for doing that. The best one depends on if
your curves
share the same x or not, and/or if they are crossing each others or not...
After a plot, you may use e = gce(); e=e.children(1); and then
either e.polyline_style=5; e.foreground=<index of the color you want>
or e.fill_mode="on"; e.background=<index of the color you want>
xfpoly(...) could also be used.
Anyway, you will likely have to complete your data by adding a heading
and a trailing well-chosen point to each curve.
Have a try and optimize according to your data.
The area between both curves may also be considered as a polygone to be
filled.
HTH
Samuel
More information about the users
mailing list