Message Boards Message Boards

1
|
7549 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

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

Posted 6 years ago

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,

Attachments:
POSTED BY: Sophie Møller
5 Replies
Posted 6 years 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

Thank you!

Posted 6 years ago

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

POSTED BY: Sophie Møller

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]

Something like this? Fig 1

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract