This is something I kept, probably from Cliff Reiter's book.
There are several plots which you can see all at once if you run it in JHS.

load 'plot'
d=: 13 :'(0{x)-(-/x)*(i.>:y)%y'    NB. domain intervals 
f=: 13 :'(0 1) d y'                    NB. frame domain 
circle=: 13 :'(1 o. y) (*"1)2 1 o./y'
tf=: 13 :'(1 o.3*y) (*"1) 2 1 o./y'  NB. trifolium
T=:2p1
plot ;/circle (0,T) d 385
plot ;/a=:(circle(0,T) d 385)*/f 385
plot ;/ tf (0,T) d 385   
plot ;/ b=:(tf d 385)*/f 385
plot ;/ c=:(tf (0,T) d 385)*/f 385
b
c
 load 'plot'
d=: 13 :'(0{x)-(-/x)*(i.>:y)%y'    NB. domain intervals 
f=: 13 :'(0 1) d y'                    NB. frame domain 
circle=: 13 :'(1 o. y) (*"1)2 1 o./y'
tf=: 13 :'(1 o.3*y) (*"1) 2 1 o./y'  NB. trifolium
T=:2p1
plot ;/circle (0,T) d 385
plot ;/a=:(circle(0,T) d 385)*/f 385
plot ;/ tf (0,T) d 385   
plot ;/ b=:(tf d 385)*/f 385
plot ;/ c=:(tf (0,T) d 385)*/f 385

Linda



-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of 'Jon Hough' via Programming
Sent: Thursday, January 18, 2018 1:49 AM
To: Programming Forum <[email protected]>
Subject: [Jprogramming] Fill between curves using plot

Using plot, is it possible to draw two curves and color-fill the area between 
them?
e.g. with matplotlib, something like this 
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmatplotlib.org%2Fapi%2Fpyplot_api.html%23matplotlib.pyplot.fill_between&data=02%7C01%7C%7Cc6013875e092416b2d9008d55e3f8483%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636518549256345902&sdata=%2BlW%2Bfmdtji26ouCyW7EpuwMang%2F%2BNXO4SShQUd9K2IU%3D&reserved=0
 ?

I've looked through the wiki 
(https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcode.jsoftware.com%2Fwiki%2FPlot&data=02%7C01%7C%7Cc6013875e092416b2d9008d55e3f8483%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636518549256345902&sdata=ekGRSnU3MrGOazCce%2FYgRUPb7IeX5J1pns%2F55JP3fE4%3D&reserved=0)
 but cannot seem to find anything that does this.

Thanks,
Jon
----------------------------------------------------------------------
For information about J forums see 
https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7Cc6013875e092416b2d9008d55e3f8483%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636518549256345902&sdata=fDFVvz%2BKRNxGw6jC6GBVhlG1qxqqhY7Mktg5iBF3dZw%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to