Message Boards Message Boards

[✓] Make filling from vertical epilog line to the y axis in LogLogPlot?

GROUPS:

Hi, I would like to ask for help on how color everything to the right of a vertical line in a LogLogPlot? From the line to the right y axis. I made the following:

LogLogPlot[x^2, {x, 0, 2 Pi}, PlotRange -> {{0.001, 5}, {10^-4, 10}}, 
 Epilog -> Line[{{Log[1], Log[10^-4]}, {Log[1], Log[10]}}], 
 Frame -> True]

I need to exclude all the area from x=1 and to the right, and therefore shade it. I tried with filling but it did not produce anything, and I also tried to make a rectangle using graphics rectangle, but it can not show together with my LogLogPlot.

Thank you in advance,

Attachment

POSTED BY: Sophie Møller
Answer
27 days ago

Something like this? Fig 1

POSTED BY: Alexander Trounev
Answer
27 days ago

OK!

LogLogPlot[x^2, {x, 0, 2 Pi}, PlotRange -> {{0.001, 5}, {10^-4, 10}}, 
 Epilog -> {Gray, Opacity[.5], 
   Table[Line[{{Log[x0], Log[10^-4]}, {Log[x0], Log[10]}}], {x0, 1, 
     2*Pi, .01}]}, Frame -> True]
POSTED BY: Alexander Trounev
Answer
27 days ago

Thank you so much! That makes sense and works perfectly!

POSTED BY: Sophie Møller
Answer
27 days ago

Thank you!

POSTED BY: Alexander Trounev
Answer
27 days ago
LogLogPlot[x^2, {x, 0, 2 Pi}, 
 Prolog -> {LightGray, 
   Rectangle[{Log[1], Log[10^-4]}, {Log[5], Log[10]}]}, Frame -> True,
  PlotRange -> {{0.001, 5}, {10^-4, 10}}]

This is a simple solution with Rectangle.

enter image description here

POSTED BY: Oliver Seipel
Answer
23 days ago

Group Abstract Group Abstract