Working with Text and Graphics Primitives in Log plots

Here is an example of how to incorporate the Graphics Primitives Text and Point in a log plot. Although the option Epilog will work it will put things in the wrong place. We will do this using an example.

Setting things up.

We need to load the Graphics`Graphics` package for the Log plot and in this case we change the default setting for Text in a plot.

<< Graphics`Graphics`

Opts6  =  
        Sequence[FontFamily -> "Times-BoldItalic", 
          FontSize -> 20];

Next we define our function. It is not necessary to define the function outside the Plot function but it can make our work easier in some cases.

g[x_] := 5 + (1 - (( x)/2))  Cos[π  x]

The points

Since we are going to want to incorporate some points in our plot we must modify them. Here is our set of points.

points  =  {{12.011239`, 0}, {13.820969`, 0}, {14.193929`, 
          0}, {14.011239`, -1.0018763452183412`}, {11.011239`, 
          9.502811258289753`}, {13.011239`, 
          10.502187982908811`}, {15.011239`, 11.50156470752787`}}

Next we correct the values of the coordinates to have them appear at the correct location in our plot. We do this by mapping {Log[10,#[[1]]],#[[2]]}& onto the set of points.

newpts  =  
      Map[{Log[10, #[[1]]], #[[2]]} &, points]

Putting things together

Now we put the parts together to obtain our plot. Notice that we have included the Log transformation to the position of the Text.

LogLinearPlot[
        Evaluate[{5 + (1 - 0.5 x) Cos[π x]}],  {x, 1, 
          12  π},  
        PlotStyle  ->  { {Thickness[0.004], Hue[1], 
              Text["", {0.2, 1.5}], Text["", {1, 0.5}], 
              Hue[1]}},   AxesLabel  ->  {"x",  "f"},  
        DefaultFont  ->  {"helvetica", 12}, 
        Epilog -> {PointSize[0.042], Hue[2/3], 
            Text[StyleForm["f(x) = 5+(1-0.5x)Cos(πx)", 
                Opts6], {Log[10, 4.742], 18}], Hue[1/3], Point /@ newpts}, 
        PlotRange  ->  All, GridLines -> Automatic, 
        PlotPoints -> 800, ImageSize  ->  480];