The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 How to shade the interesection of certain function

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hawkjay Posted - 10/02/2011 : 11:16:42 AM
Hi, everyone:
I would like to shade the area among functions: y=1, y=(-x)/(x+2);y=-1-x;and x=0 (vertical axis); while these functions are desirable if drawn over [-2,+2] together with y=-1+x.

Any suggestions would be welcome. Thanks
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 10/03/2011 : 11:03:54 AM
There is no simple solution. You need to create datasets which represent the X,Y boundary of the area you wish to shade. Then you can include that X,Y data in your graph as a Line plot and set "Fill Area Under Curve" to use "Inclusive broken by missing values".

I did not understand your explanations of your functions, since one seems irrelevant to the area, but here is some script that demonstrates the idea:
newbook;
%B = col(2);
range rax = 1;
range ray = 2;
win -t plot line;
F1(x) = (-x) / (x + 2);
// Not needed?
// F2(x) = -1 - x;
F3(x) = -1 + x;
// I calculate the intersection of F1 and F3 as
// x=0.73205080028705
// y=-0.26794910972909
// Establish some boundary data for F1
rax = data(0,0.73205089027091,.02);
ray = F1(rax);
last = rax.GetSize();
// Boundary data for F3
rax[last+1] = 0;
ray[last+1] = -1;
// Origin automatically closes to (0,0)
plotxy (rax,ray) plot:=200 og:=<active>;
x1 = -1;x2 = 2;x3 = 1;
y1 = -2;y2 = 1;y3 = 1;
set %B -pf 1;

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000