7

I am making ListLogLog plots with polygons in the Prolog and lines in the Epilog, and I want to know how to make sure that the polygons and lines are being plotted consistently. One method that I know gives me lines with the right shape is to have

ListLogLogPlot[
 PlotRange -> {{.01, 10}, {10^-10, 10^-5}},
 AspectRatio -> 1,
 FrameTicks -> {
   {
    Automatic
    ,
    Automatic},
   {Automatic
    ,
    Automatic}},
 Prolog -> {
   Style[Polygon[Log[PLSND]], Lighter[Gray, .45], Opacity[1]]
   },
 Epilog -> {Style[Polygon[Log[10^Data]]]}]

PLSND is a list of points given in (x,y), while Data is a list of points given in (Log10[x], Log10[y]).

My concern is that the PLSND and Data lines/polygons will be plotted with incorrect scaling relative to any other lists I give in the standard format. I have tried using Log10 instead of Log, or Log[Exp[Data]], but neither of these substitutions displays a line on my graph.

Kuba
  • 136,707
  • 13
  • 279
  • 740
Jordan
  • 173
  • 6
  • 1
    Keep in mind that when you post a minimal working example it will be easier for others to provide a solution. E.g. why do we have to make up PLSND and DATA? – Kuba Dec 22 '15 at 08:04

1 Answers1

11
data = Table[PartitionsQ[n], {n, 50}];
epilog = {EdgeForm@Thick, FaceForm@None, Rectangle[{20, 500}, {40, 2000}]};

ListPlot[data, Epilog -> epilog]

ListLogPlot[data, 
 Epilog -> (epilog /. {x_, y_?NumericQ} :> {x, Log[y]})]

ListLogLogPlot[data, 
 Epilog -> (epilog /. {x_, y_?NumericQ} :> Log@{x, y})]

enter image description here

Closely related topics:

Kuba
  • 136,707
  • 13
  • 279
  • 740