Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Epilog doesn't work with loglinearplot

358 views
Skip to first unread message

wiso

unread,
Mar 5, 2009, 4:51:36 AM3/5/09
to
I've have a problem with loglinearplot

Plot[x, {x, 1, 10}, Epilog -> Line[{{4, 0}, {4, 10}}]]

Ok, I see the line

LogLinearPlot[x, {x, 1, 10}, Epilog -> Line[{{4, 0}, {4, 10}}]]

why I don't see the line? Can someone suggest an alternative method to
superimpose a line over a loglinearplot?


Jens-Peer Kuska

unread,
Mar 6, 2009, 4:10:01 AM3/6/09
to
Hi,

since Epilog wotk after all Mathematica actions

LogLinearPlot[x, {x, 1, 10},

Epilog -> Line[{Log[#[[1]]], #[[2]]} & /@ {{4, 0}, {4, 10}}]]

will do it.

Regards
Jens

David Park

unread,
Mar 6, 2009, 4:10:12 AM3/6/09
to
LogLinearPlot[x, {x, 1, 10},
Epilog -> Line[{{Log[4], 0}, {Log[4], 10}}]]


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/

D. Grady

unread,
Mar 6, 2009, 4:13:32 AM3/6/09
to
Whenever you use any of the Log plots, the coordinate system does not
match the coordinates drawn on the axes. If you want to draw graphics
primitives using the marks on the axes, you need to the take the Log
of the appropriate part of the points in the graphics commands, like
this:

LogLinearPlot[x, {x, 1, 10}, Epilog -> Line[{{Log@4, 0}, {Log@4,
10}}]]

If you had used LogPlot, you would need to take Log of the y-
coordinates in your Epilog command; if you had used LogLogPlot, take
the Log of both x- and y-coordinates.

-Daniel

Bill Rowe

unread,
Mar 6, 2009, 4:14:14 AM3/6/09
to
On 3/5/09 at 4:51 AM, gtu...@alice.it (wiso) wrote:

>I've have a problem with loglinearplot

>Plot[x, {x, 1, 10}, Epilog -> Line[{{4, 0}, {4, 10}}]]

>Ok, I see the line

>LogLinearPlot[x, {x, 1, 10}, Epilog -> Line[{{4, 0}, {4, 10}}]]

>why I don't see the line?

Because the range of the plot doesn't include the coordinates
for the line. The line will appear at x = e^4 which is greater
than 10. You can see this is the case by doing:

LogLinearPlot[x, {x, 1, 60}, Epilog -> Line[{{4, 0}, {4, 10}}]]

You can get the desired result by doing:

LogLinearPlot[x, {x, 1, 10},
Epilog -> Line[{{Log@4, 0}, {Log@4, 10}}]]

And since you are drawing a vertical line across the entire plot
an alternative would be:

LogLinearPlot[x, {x, 1, 10}, GridLines -> {{4}, None}]


Bob Hanlon

unread,
Mar 6, 2009, 4:16:10 AM3/6/09
to
LogLinearPlot[x, {x, 1, 10},
Epilog -> Line[{{Log[4], 0}, {Log[4], 10}}]]

LogLinearPlot[x, {x, 1, 10},
Epilog -> Line[{Log[4], #} & /@ {0, 10}]]


Bob Hanlon

---- wiso <gtu...@alice.it> wrote:

=============


I've have a problem with loglinearplot

Plot[x, {x, 1, 10}, Epilog -> Line[{{4, 0}, {4, 10}}]]

Ok, I see the line

LogLinearPlot[x, {x, 1, 10}, Epilog -> Line[{{4, 0}, {4, 10}}]]

why I don't see the line? Can someone suggest an alternative method to

M.Roellig

unread,
Mar 6, 2009, 4:09:50 AM3/6/09
to

Hi,

I am also always struggling with manual positioning in any Log-Plot.
Problem is that Epilog doesn't know how LogLinearPlot rescales the Image-
Coordinates. Try:

LogLinearPlot[x, {x, 1, 10},

Epilog -> Line[{{Log@4, 0}, {Log@4, 10}}]]


Cheers,

Markus

wiso

unread,
Mar 7, 2009, 2:39:19 AM3/7/09
to
M.Roellig wrote:

Thanks, now it works, but I think it's not very intuitive.


0 new messages