cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to fill the area under the curve with colours?

Cornel
19-Tanzanite

How to fill the area under the curve with colours?

Hello,

Cornel_0-1689924240904.png

Cornel_4-1689924496289.png

 

Is it possible to fill the area under the graph with some colours like in this example from below?
So, from

Cornel_5-1689924533068.png
with some colour
and from

Cornel_6-1689924583255.png
with other colour 

 

Cornel_0-1689926560206.png

 

Mathcad Prime 8 file attached.

 

42 REPLIES 42
ttokoro
20-Turquoise
(To:Cornel)

A boolean function which determines if a point is inside the region or not can fill simple dots. Werner shows the plot by Mathcad 15. I try to use Prof. Birkeland's work posted by Werner for plot it by Prime 9. I need some time and now I can ues the Dots function to fill the area by Prime 9. Thanks all infomations.

 

image.pngimage.png

image.png

Cornel
19-Tanzanite
(To:ttokoro)

But therefore can you attach also a Mathcad Prime 8/9 file? Or at least some pictures with what you have made right now? Only showing the results it is not enough to understand...

Werner_E
25-Diamond I
(To:Cornel)

There is nothing hidden - at least not in the picture (MC15) which I posted here and in the other thread.

 Its the very same in Prime with no modification necessary!

 

Grab the small very first function Dots() in the already posted sheet of Prof. Birkeland (you don't need anything alse for a simple dotted fill)  and then do what is seem in my screenshot. Format the dots to use a dot as symbol and no lines.

You may have to experiment with the number and sizes of the dots because Prime only allows to set a very (too) limited number of sizes.

 

The example(s) shown by ttokoro stem from here -> Solved: Re: How to fill a quadrilateral with color ? - PTC Community

ttokoro
20-Turquoise
(To:Cornel)

Solved: How to fill a quadrilateral with color ? - PTC Community

Werner_E shows the Mathcad 15 file and we can convert it to Prime 8 or 9 file. 

All Prof. Birkeland's functions are able to  re-calculate and plot in Prime 9.

So, we use the boolean functions that Werner_E show us in the SNS.

Just try it.

I attach Prime 9 format here.

ttokoro
20-Turquoise
(To:ttokoro)

I mention above I need some time to do. This means if you try to do same plot, you have a chance to fall an error.

I'm not sure this error must occur or not. So, if you fall in error and nothing to do. Post it and I will try it.

Tokoro. 

Cornel
19-Tanzanite
(To:ttokoro)

Is it possible to color it like this?

Cornel_0-1690893027348.png

 

Cornel_1-1690893051390.png

 



Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

Is it possible to color it like this?

 


Sure! Why shouldn't it? Have you ever gave it a try???

 

Simply use

Werner_E_0-1690899867002.png

for the boolean functions.

Cornel
19-Tanzanite
(To:Werner_E)

At this moment I do not understand how to fill with these boolean functions. Can you explain a little bit on how to fill with boolean functions?

Werner_E
25-Diamond I
(To:Cornel)

The boolean functions are needed to use the various fill and hatch functions from Prof. Birkelands sheet which I already posted and also mentioned now an then. Its a very versatile concept and there is no need to "invent" a new "trick" for every new situation.

The boolean functions describe/define the area to be filled (with dots, with parallel lines, with a family of curves,...).

 

Werner_E_0-1690908076771.png

 

Werner_E
25-Diamond I
(To:Werner_E)

And, yes, ... you can achieve a similar effect using just stem plots if you take care of the order in which they are plotted and if  you think about the "trick" with the min() function.

Werner_E_1-1690909205219.png

I definitely won't suggest doing so!

Werner_E
25-Diamond I
(To:Werner_E)

And of course you may also use the simple fill/hatch function which was already posted in various variants here.

Again you have to take care of the order in which the traces are plotted and again you need apply a little trick like the min function.

So I sure would prefer the Dots() function or the like as being straightforward and most versatile.

Werner_E_0-1690912254690.png

 

I attach the Mathcad 15 sheets, mainly because its much easier, faster and more convenient to develop a sheet in this version and the additional benefit is that you can convert it to the version of Prime you are using and have no troubles with Prime sheets in  a version yours can't read. I am not sure if the plots will convert correctly and well, though - you'll have to give it a try and edit the converted sheet to your needs.

 

ttokoro
20-Turquoise
(To:Cornel)

image.pngimage.png

Werner_E
25-Diamond I
(To:ttokoro)


@ttokoro wrote:

Solved: How to fill a quadrilateral with color ? - PTC Community

Werner_E shows the Mathcad 15 file and we can convert it to Prime 8 or 9 file. 

All Prof. Birkeland's functions are able to  re-calculate and plot in Prime 9.

So, we use the boolean functions that Werner_E show us in the SNS.

Just try it.

I attach Prime 9 format here.


No need to convert - I already posted the Prime version of Prof. Birkeland's file here in this very thread

https://community.ptc.com/t5/Mathcad/How-to-fill-the-area-under-the-curve-with-colours/m-p/888943/highlight/true#M207711

I just reposted a MC15 version in the other thread because the thread-starter lvl197 is using real Mathcad and not Prime.

Announcements

Top Tags