How to Fill Areas Between Curves in Mathematica?

  • Thread starter Thread starter rularn
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

To fill the area between curves in Mathematica, utilize the Filling option within the Plot function. Specifically, the command Plot[{3/(4 x), 4/(4 x), 1/(4 x^3), 1/(2.7 x^3)}, {x, 0.45, 0.75}, Ticks -> False, AxesLabel -> {V, P}, PlotRange -> {0.5, 3}, Filling -> {1 -> {2}, 3 -> {4}}] effectively fills the regions between the first and second curves, as well as the third and fourth curves. This method allows for clear visual differentiation between the specified functions.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of mathematical functions and their graphical representations
  • Basic knowledge of plotting techniques in Mathematica
  • Experience with the Filling option in graphical plots
NEXT STEPS
  • Explore advanced plotting techniques in Mathematica
  • Learn about customizing plot aesthetics in Mathematica
  • Investigate the use of multiple Filling options for complex plots
  • Study the impact of different mathematical functions on graphical outputs
USEFUL FOR

Mathematica users, data visualizers, mathematicians, and educators looking to enhance their graphical representation skills in mathematical contexts.

rularn
Messages
8
Reaction score
0
Hi!

I don't know where to put this but I hope you guys can help me. Its simple.

How do I fill the area in mathematica between:

3/(4 x), 4/(4 x), 1/(4 x^3), 1/(2.7 x^3) ?


Code:
Plot[{3/(4 x), 4/(4 x), 1/(4 x^3), 1/(2.7 x^3)}, {x, 0.45, 0.75}, 
 Ticks -> False, AxesLabel -> {V, P}, PlotRange -> {0.5, 3}]

Thank you
 
Physics news on Phys.org
rularn said:
How do I fill the area in mathematica between:

Why don't you try to add the Filling option? This fills the curves between the 1st and 2nd, and 3rd and 4th function. If you want the strips to be organized differently, you would have to explain what you want more accurately. Try:

Code:
Plot[{3/(4 x), 4/(4 x), 1/(4 x^3), 1/(2.7 x^3)}, {x, 0.45, 0.75}, 
 Ticks -> False, AxesLabel -> {V, P}, PlotRange -> {0.5, 3}, 
 Filling -> {1 -> {2}, 3 -> {4}}]
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K