# Adding graphics primitives to log plots [duplicate]

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.

• 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 8:04

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})]


Closely related topics:

• Thank you, this confirms that the polygons scale properly, but why is it that just applying Log to the particular coordinates rather than Log10 gives the correct result? – Jordan Dec 22 '15 at 8:09
• @Jordan Log is a natural logarithm, it is used for those plots. – Kuba Dec 22 '15 at 8:10
• Why not NumericQ instead of NumberQ? – kirma Dec 22 '15 at 8:37
• @kirma without any specific reason, will replace it to make it more general. – Kuba Dec 22 '15 at 8:39