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.
Answer
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:
Comments
Post a Comment