0
$\begingroup$

We want to fill a part of below of a plot which is brought here as

Show[Plot[
 10^-29/((E^(10^-6/x) - 1) x^5), {x, 0.0000000001, 0.000001}], 
 Plot[10^-29/((E^(10^-6/x) - 1) x^5), {x, 4*10^-7, 6*10^-7}, 
  Filling -> Axis, PlotRange -> All]]

Unfortunately the highlighted region (filled area) is not extended completely up to the x axis (y=0). How can we solve the problem?

enter image description here

$\endgroup$
2
  • 3
    $\begingroup$ Include AxesOrigin->{0,0} in the second plot. $\endgroup$
    – Carl Woll
    Nov 5, 2018 at 17:52
  • 1
    $\begingroup$ Try also Filling -> 0. $\endgroup$ Nov 5, 2018 at 18:27

1 Answer 1

2
$\begingroup$

As per @CarlWoll's comment, the quickest way to achieve this is to include AxesOrigin -> {0,0} in the second plot:

Show[
 Plot[10^-29/((E^(10^-6/x) - 1) x^5), {x, 0.0000000001, 0.000001}],
 Plot[10^-29/((E^(10^-6/x) - 1) x^5), {x, 4*10^-7, 6*10^-7}, 
  PlotRange -> All, Filling -> Axis, AxesOrigin -> {0, 0}]
]

enter image description here

The reason for the original code only shading part of the plot is that the original second plot, considered on its own, only shows a fraction of the combined plot's area, and so its axes are not the 'usual' axes centred at (0,0):

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.