({{, (RefLink[LogPlot, paclet:ref/LogPlot])[f,{x,(Subscript[x, min]),(Subscript[x, max])}]
generates a log plot of f as a function of x from (Subscript[x, min]) to (Subscript[x, max]). }, {, (RefLink[LogPlot, paclet:ref/LogPlot])[{(Subscript[f, 1]),(Subscript[f, 2]),…},{x,(Subscript[x, min]),(Subscript[x, max])}]
plots several functions (Subscript[f, i]). }, {, (RefLink[LogPlot, paclet:ref/LogPlot])[{…,w[(Subscript[f, i])],…},…]
plots (Subscript[f, i]) with features defined by the symbolic wrapper w.}, {, (RefLink[LogPlot, paclet:ref/LogPlot])[…,{x}∈reg]
takes the variable x to be in the geometric region reg.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[LogPlot, paclet:ref/LogPlot]) effectively generates a curve based on (RefLink[Log, paclet:ref/Log])[f], but with tick marks indicating the values of the underlying function f.

(RefLink[LogPlot, paclet:ref/LogPlot]) makes exponentials appear as straight lines.

(RefLink[LogPlot, paclet:ref/LogPlot]) evaluates f at different values of x to create a smooth curve of the form {x,f[x]}.

Gaps are left at any x where the (Subscript[f, i]) evaluate to anything other than positive real numbers or 
(RefLink[Quantity, paclet:ref/Quantity]).

The limits (Subscript[x, min]) and (Subscript[x, max]) can be real numbers or (RefLink[Quantity, paclet:ref/Quantity]) expressions.

The region reg can be any (RefLink[RegionQ, paclet:ref/RegionQ]) object in 1D.

(RefLink[LogPlot, paclet:ref/LogPlot]) treats the variable x as local, effectively using (RefLink[Block, paclet:ref/Block]).

(RefLink[LogPlot, paclet:ref/LogPlot]) has attribute (RefLink[HoldAll, paclet:ref/HoldAll]) and evaluates f only after assigning specific numerical values to x.

In some cases, it may be more efficient to use (RefLink[Evaluate, paclet:ref/Evaluate]) to evaluate f symbolically before specific numerical values are assigned to x.

The following wrappers w can be used for the (Subscript[f, i]):

Wrappers w can be applied at multiple levels:

(RefLink[Callout, paclet:ref/Callout]), (RefLink[Labeled, paclet:ref/Labeled]), and (RefLink[Placed, paclet:ref/Placed]) can use the following positions pos:

(RefLink[LogPlot, paclet:ref/LogPlot]) has the same options as (RefLink[Graphics, paclet:ref/Graphics]), with the following additions and changes:

Possible settings for (RefLink[ClippingStyle, paclet:ref/ClippingStyle]) are:

With the default settings (RefLink[Exclusions, paclet:ref/Exclusions])->(RefLink[Automatic, paclet:ref/Automatic]) and (RefLink[ExclusionsStyle, paclet:ref/ExclusionsStyle])->(RefLink[None, paclet:ref/None]), (RefLink[LogPlot, paclet:ref/LogPlot]) breaks curves at discontinuities and singularities it detects. (RefLink[Exclusions, paclet:ref/Exclusions])->(RefLink[None, paclet:ref/None]) joins across discontinuities and singularities.

(RefLink[Exclusions, paclet:ref/Exclusions])->{(Subscript[x, 1]),(Subscript[x, 2]),…} is equivalent to (RefLink[Exclusions, paclet:ref/Exclusions])->{x==(Subscript[x, 1]),x==(Subscript[x, 2]),…}.

(RefLink[PlotLegends, paclet:ref/PlotLegends])->"Expressions" uses the (Subscript[f, i]) as the legend text.

(RefLink[LogPlot, paclet:ref/LogPlot]) initially evaluates f at a number of equally spaced sample points specified by (RefLink[PlotPoints, paclet:ref/PlotPoints]). Then it uses an adaptive algorithm to choose additional sample points, subdividing a given interval at most (RefLink[MaxRecursion, paclet:ref/MaxRecursion]) times.

Since only a finite number of sample points are used, it is possible for (RefLink[LogPlot, paclet:ref/LogPlot]) to miss features of f. Increasing the settings for (RefLink[PlotPoints, paclet:ref/PlotPoints]) and (RefLink[MaxRecursion, paclet:ref/MaxRecursion]) will often catch such features.

Themes that affect curves include:

The arguments supplied to functions in (RefLink[MeshFunctions, paclet:ref/MeshFunctions]) and (RefLink[RegionFunction, paclet:ref/RegionFunction]) are x, y. Functions in (RefLink[ColorFunction, paclet:ref/ColorFunction]) are by default supplied with scaled versions of these arguments.

OpenersPrimaryExamplesSection(Spacer1)Examples  (115)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Plot a function with a logarithmically scaled y axis:

LogPlot[x^x,{x,1,5}]

Plot several functions:

LogPlot[{x^x,Exp[x],x!},{x,1,5},PlotLegends->"Expressions"]

Label each curve:

LogPlot[{x^2,x^4},{x,0,2Pi},PlotLabels->"Expressions"]

Fill between curves:

LogPlot[{x^x,x!},{x,1,10},Filling->{1->{2}}]

OpenersExampleSection1(Spacer1)Scope  (23)

OpenersExampleSubsection0(Spacer1)Sampling  (6)

More points are sampled when the function changes quickly:

LogPlot[Abs[Gamma[x]],{x,-5,2}]

The plot range is selected automatically:

LogPlot[Abs[1/x],{x,-1,1}]

Ranges where the function becomes negative are excluded:

LogPlot[x,{x,-1,1}]

The curve is split when there are discontinuities in the function:

LogPlot[Floor[Sqrt[x]],{x,0,100}]

Use (RefLink[Exclusions, paclet:ref/Exclusions])->(RefLink[None, paclet:ref/None]) to draw a connected curve:

LogPlot[Floor[Sqrt[x]],{x,0,100},Exclusions->None]

Use (RefLink[PlotPoints, paclet:ref/PlotPoints]) and (RefLink[MaxRecursion, paclet:ref/MaxRecursion]) to control adaptive sampling:

Grid@Table[LogPlot[Abs[Gamma[x]],{x,-3,0},PlotPoints->pp,MaxRecursion->mr],{mr,{0,1,2}},{pp,{5,10}}]

Use (RefLink[PlotRange, paclet:ref/PlotRange]) to focus in on areas of interest:

{LogPlot[Exp[x]/Abs[x-2],{x,0,5}],LogPlot[Exp[x]/Abs[x-2],{x,0,5},PlotRange->{10,100}]}

OpenersExampleSubsection1(Spacer1)Labeling and Legending  (8)

Label curves with (RefLink[Labeled, paclet:ref/Labeled]):

LogPlot[Evaluate@Table[Labeled[x^n,x^n],{n,1,3}],{x,0,3}]

Place the labels relative to the curves:

Table[LogPlot[Labeled[x^Sin[x],"label",p],{x,0,2Pi},PlotLabel->p],{p,{Above,Below,Before,After}}]

Label curves with (RefLink[PlotLabels, paclet:ref/PlotLabels]):

LogPlot[{x^x,x!},{x,1,10},PlotLabels->{x^2,x!}]

Place the label near the curve at an x value:

LogPlot[Labeled[x^Sin[x],x^Sin[x],3],{x,0,2π}]

Use a scaled position:

LogPlot[Labeled[x^Sin[x],x^Sin[x],Scaled[0.3]],{x,0,2π}]

Specify the text position relative to the point:

LogPlot[Labeled[x^Sin[x],x^Sin[x],{Scaled[0.3],Above}],{x,0,2π}]

Label curves automatically with (RefLink[Callout, paclet:ref/Callout]):

LogPlot[{Callout[x^Sin[x],x^Sin[x]],Callout[x,x]},{x,1,18}]

Place labels at specific locations:

LogPlot[Callout[x^(Sin[x]),"max",Above],{x,1,5}]

LogPlot[{Callout[x,x,{5,Above}],Callout[x^(Sin[x]),x^x,16]},{x,1,18}]

Include legends for each curve:

LogPlot[{x^Sin[x],x^Cos[x]},{x,0,2π},PlotLegends->{x^Sin[x],x^Cos[x]}]

Use (RefLink[Legended, paclet:ref/Legended]) to provide a legend for a specific curve:

LogPlot[{x^Sin[x],Legended[Mean[{x^Sin[x],x^Cos[x]}],"average"],x^Cos[x]},{x,0,2π}]

Use (RefLink[Placed, paclet:ref/Placed]) to change the legend location:

LogPlot[{x^Sin[x],Legended[Mean[{x^Sin[x],x^Cos[x]}],Placed["average",Below]],x^Cos[x]},{x,0,2π}]

OpenersExampleSubsection2(Spacer1)Presentation  (9)

Multiple curves are automatically colored to be distinct:

LogPlot[{x^(1/4),x^(3/4),x^(3/2),x^(7/2)},{x,0,2}]

Provide explicit styling to different curves:

LogPlot[{x^(1/4),x^(3/4),x^(3/2),x^(7/2)},{x,0,2},PlotStyle->{Thick,Automatic,Red,Dashed}]

Create legends from the functions:

LogPlot[{x^x,x!},{x,1,10},PlotLegends->"Expressions"]

Specify labels for legends:

LogPlot[{x^x,x!},{x,1,10},PlotLegends->{"one","two"}]

Add labels:

LogPlot[Exp[x]/Abs[x-2],{x,0,5},AxesLabel->{x,y},PlotLabel->Exp[x]/Abs[x-2]]

Provide an interactive (RefLink[Tooltip, paclet:ref/Tooltip]) for each curve:

LogPlot[{Tooltip[x],Tooltip[1/x]},{x,0,3}]

Create filled plots:

LogPlot[{x,1/x},{x,0,3},Filling->1]

Create an overlay mesh:

LogPlot[Exp[x]/Abs[x-2],{x,0,5},Mesh->20]

Style the curve segments between mesh points:

LogPlot[Exp[x]/Abs[x-2],{x,0,5},Mesh->15,MeshShading->{Red,None,Blue}]

Use plot theme:

LogPlot[Exp[x]/Abs[x-2],{x,0,5},PlotTheme->"Marketing"]

OpenersExampleSection2(Spacer1)Options  (81)

OpenersExampleSubsection3(Spacer1)ClippingStyle  (4)

Omit clipped regions of the plot:

LogPlot[Exp[Sin[x]/(1.2x)^2],{x,-1,1},ClippingStyle->None,PlotRange->{1/100,100},AxesOrigin->{-1,1}]

Show clipped regions with red lines:

LogPlot[Exp[Sin[x]/(1.2x)^2],{x,-1,1},ClippingStyle->Red,PlotRange->{1/100,100},AxesOrigin->{-1,1}]

Show clipped regions as thick at the bottom, and red at the top:

LogPlot[Exp[Sin[x]/(1.2x)^2],{x,-1,1},ClippingStyle->{Red,Thick},PlotRange->{1/100,100},AxesOrigin->{-1,1}]

Show clipped regions as red and thick:

LogPlot[Exp[Sin[x]/(1.2x)^2],{x,-1,1},ClippingStyle->Directive[Thick,Red],PlotRange->{1/100,100},AxesOrigin->{-1,1}]

OpenersExampleSubsection4(Spacer1)ColorFunction  (6)

Color by scaled y coordinate and scaled x coordinate, respectively:

{LogPlot[Gamma[x]/x,{x,1,5},ColorFunction->Function[{x,y},Hue[y]]],LogPlot[Gamma[x]/x,{x,1,5},ColorFunction->Function[{x,y},Hue[x]]]}

Color with a named color scheme:

LogPlot[Gamma[x]/x,{x,1,5},ColorFunction->"DarkRainbow"]

Color a curve red when its absolute y coordinate is above 1:

LogPlot[Gamma[x]/x,{x,1,5},ColorFunction->Function[{x,y},If[y>1,Red,Black]],ColorFunctionScaling->False,PlotStyle->Thick]

Fill with the color used for the curve:

LogPlot[Gamma[x]/x,{x,1,5},ColorFunction->Function[{x,y},Hue[y]],Filling->Axis]

(RefLink[ColorFunction, paclet:ref/ColorFunction]) has higher priority than (RefLink[PlotStyle, paclet:ref/PlotStyle]) for coloring the curve:

LogPlot[Gamma[x]/x,{x,1,5},ColorFunction->"DarkRainbow",PlotStyle->Directive[Red,Thick]]

Use a color function that is red at powers of 10:

LogPlot[Gamma[x]/x,{x,1,7},ColorFunction->Function[{x,y},Hue[Log[10,y]]],PlotStyle->Thick,ColorFunctionScaling->False]

OpenersExampleSubsection5(Spacer1)ColorFunctionScaling  (3)

No argument scaling on the left, automatic scaling on the right:

Table[LogPlot[Gamma[x]/x,{x,1,5},PlotStyle->Thick,ColorFunction->Function[{x,y},Hue[y]],ColorFunctionScaling->cf],{cf,{False,True}}]

Scaling is done on a linear scale in the original coordinates:

Table[LogPlot[Exp[t],{t,0,2^i},PlotStyle->Thick,ColorFunction->Function[{x,y},Hue[y]]],{i,{0,2,4}}]

Use a color function that is red at powers of 10:

LogPlot[Gamma[x]/x,{x,1,7},ColorFunction->Function[{x,y},Hue[Log[10,y]]],PlotStyle->Thick,ColorFunctionScaling->False]

OpenersExampleSubsection6(Spacer1)EvaluationMonitor  (3)

Find the list of values sampled by (RefLink[LogPlot, paclet:ref/LogPlot]):

Reap[LogPlot[Exp[x]/Abs[(x-1)(x+1)],{x,-5,5},EvaluationMonitor:>Sow[x]];]//Short

Show where (RefLink[LogPlot, paclet:ref/LogPlot]) evaluates the function:

data=Reap[ LogPlot[Exp[x]/Abs[(x-1)(x+1)],{x,-5,5},EvaluationMonitor:>Sow[{x,Exp[x]/Abs[(x-1)(x+1)]}]] ][[-1,1]];

ListLogPlot[data ,Filling->Axis]

Count how many times the function is evaluated:

Block[{k=0},LogPlot[Exp[x]/Abs[(x-1)(x+1)],{x,-5,5},EvaluationMonitor:>k++];k]

OpenersExampleSubsection7(Spacer1)Exclusions  (2)

Use automatic methods for computing exclusions, in this case for a piecewise function:

LogPlot[Sum[Boole[2^(k-1)<x<2^k]x/(2^k-x),{k,5}],{x,0,2^5}]

Indicate that no exclusions should be computed:

LogPlot[Sum[Boole[2^(k-1)<x<2^k]x/(2^k-x),{k,5}],{x,0,2^5},Exclusions->None]

OpenersExampleSubsection8(Spacer1)ExclusionsStyle  (2)

Use dashed lines to indicate the vertical asymptotes:

LogPlot[Sum[Boole[2^(k-1)<x<2^k]x/(2^k-x),{k,5}],{x,0,2^5},ExclusionsStyle->Dashed]

Use blue points to highlight the exclusions:

LogPlot[Gamma[Floor[x]],{x,0,10},ExclusionsStyle->{None,Blue}]

OpenersExampleSubsection9(Spacer1)Filling  (7)

Use symbolic or explicit values:

Table[LogPlot[Abs[Tan[x]],{x,0,10},Filling->f],{f,{Axis,Top,Bottom,1}}]

Overlapping fills by default combine using opacity:

LogPlot[{(x-1)^2,1/(x-1)^2},{x,0,3},Filling->Axis]

Fill between curve 1 and the axis:

LogPlot[{(x-1)^2,1/(x-1)^2},{x,0,3},Filling->{1->Axis}]

Fill between curves 1 and 2:

LogPlot[{(x-1)^2,1/(x-1)^2},{x,0,3},Filling->{1->{2}}]

Fill between curves 1 and 2 with a specific style:

LogPlot[{(x-1)^2,1/(x-1)^2},{x,0,3},Filling->{1->{{2},Yellow}}]

Fill between curves 1 and 2; use yellow when 1 is below 2 and green when 1 is above 2:

LogPlot[{(x-1)^2,1/(x-1)^2},{x,0,3},Filling->{1->{{2},{Yellow,Green}}}]

Fill between curves 1 and y==1 with yellow:

LogPlot[{(x-1)^2,1/(x-1)^2},{x,0,3},Filling->{1->{1,Yellow}}]

OpenersExampleSubsection10(Spacer1)FillingStyle  (3)

Use different fill colors:

Table[LogPlot[Abs[Tan[x]],{x,0,10},Filling->Bottom,FillingStyle->c],{c,{Red,Green,Blue,Yellow}}]

Fill with opacity 0.5 yellow:

LogPlot[x+2Sin[x],{x,0,15},Filling->Bottom,FillingStyle->Directive[Opacity[0.5],Yellow]]

Fill with red below y==5 and blue above:

LogPlot[x+2Sin[x],{x,0,15},Filling->5.,FillingStyle->{Red,Blue}]

OpenersExampleSubsection11(Spacer1)LabelingSize  (4)

Textual labels are shown at their actual sizes:

LogPlot[{Log[x],x},{x,1,10},PlotLabels->{"barcarole","perilously"}]

Image labels are automatically resized:

LogPlot[{Log[x],x},{x,1,10},PlotLabels->{,}]

Specify a maximum size for textual labels:

LogPlot[{Log[x],x},{x,1,10},PlotLabels->{"barcarole","perilously"},LabelingSize->30]

Specify a maximum size for image labels:

LogPlot[{Log[x],x},{x,1,10},PlotLabels->{,},LabelingSize->50]

Show image labels at their natural sizes:

LogPlot[{Log[x],x},{x,1,10},PlotLabels->{,},LabelingSize->Full]

OpenersExampleSubsection12(Spacer1)MaxRecursion  (2)

The default sampling mesh:

LogPlot[Sin[1/t]^2,{t,0.01,1},Mesh->All]

Each level of (RefLink[MaxRecursion, paclet:ref/MaxRecursion]) will subdivide the initial mesh into a finer mesh:

Table[ LogPlot[Sin[1/t]^2,{t,0.01,1},MaxRecursion->i,Mesh->All,Ticks->None],{i,{0,3,6}}]

OpenersExampleSubsection13(Spacer1)Mesh  (3)

Show the initial and final sampling meshes:

{LogPlot[x^Sin[x],{x,0,10},Mesh->Full],
LogPlot[x^Sin[x],{x,0,10},Mesh->All]}

Use 20 mesh levels evenly spaced in the x direction:

LogPlot[x^Sin[x],{x,0,10},Mesh->20]

Use an explicit list of values for the mesh in the x direction:

LogPlot[x^Sin[x],{x,0,10},Mesh->{Range[0,10,1]},MeshStyle->PointSize[Medium]]

OpenersExampleSubsection14(Spacer1)MeshFunctions  (4)

Use a mesh evenly spaced in the x and y directions:

Table[LogPlot[x^Sin[x],{x,0,10},MeshFunctions->{f},Mesh->20],{f,{Function[{x,y},x],Function[{x,y},y]}}]

Mesh functions use the unscaled values in the y direction:

LogPlot[E^x,{x,0,5},Mesh->10,MeshFunctions->{#2&},MeshStyle->PointSize[Medium]]

Use (RefLink[Log, paclet:ref/Log]) to scale the mesh functions in the y direction:

LogPlot[E^x,{x,0,5},Mesh->10,MeshFunctions->{Log[#2]&},MeshStyle->PointSize[Medium]]

Show 5 mesh levels in the x direction (red) and 10 in the y direction (blue):

LogPlot[x!,{x,0,5},Mesh->{5,10},MeshFunctions->{#1&,#2&},MeshStyle->{Directive[PointSize[Medium],Red],Blue}]

OpenersExampleSubsection15(Spacer1)MeshShading  (6)

Alternate red and blue segments of equal width in the x direction:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,MeshFunctions->{#1&},MeshShading->{Red,Blue}]

Use (RefLink[None, paclet:ref/None]) to remove segments:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,MeshFunctions->{#1&},MeshShading->{Red,None}]

(RefLink[MeshShading, paclet:ref/MeshShading]) can be used with (RefLink[PlotStyle, paclet:ref/PlotStyle]):

LogPlot[x^Sin[x],{x,0,10},Mesh->10,PlotStyle->Thick,MeshFunctions->{#1&},MeshShading->{Red,Blue}]

(RefLink[MeshShading, paclet:ref/MeshShading]) has higher priority than (RefLink[PlotStyle, paclet:ref/PlotStyle]) for styling the curve:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,PlotStyle->Green,MeshFunctions->{#1&},MeshShading->{Red,Blue}]

Use (RefLink[PlotStyle, paclet:ref/PlotStyle]) for some segments by setting (RefLink[MeshShading, paclet:ref/MeshShading]) to (RefLink[Automatic, paclet:ref/Automatic]):

LogPlot[x^Sin[x],{x,0,10},Mesh->10,PlotStyle->Directive[Thick,Yellow],MeshFunctions->{#1&},MeshShading->{Red,Automatic}]

(RefLink[MeshShading, paclet:ref/MeshShading]) can be used with (RefLink[ColorFunction, paclet:ref/ColorFunction]):

LogPlot[x^Sin[x],{x,0,10},Mesh->10,PlotStyle->Thick,MeshFunctions->{#1&},MeshShading->{Black,Automatic},
ColorFunction->Function[{x,y},Hue[x]]]

OpenersExampleSubsection16(Spacer1)MeshStyle  (4)

Color the mesh the same color as the plot:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,MeshStyle->Automatic]

Use a red mesh in the x direction:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,MeshStyle->Red]

Use a red mesh in the x direction and a blue mesh in the y direction:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,MeshStyle->{Red,Blue},MeshFunctions->{#1&,#2&}]

Use big red mesh points in the x direction:

LogPlot[x^Sin[x],{x,0,10},Mesh->10,MeshStyle->Directive[PointSize[Large],Red]]

OpenersExampleSubsection17(Spacer1)PerformanceGoal  (2)

Generate a higher-quality plot:

Timing[LogPlot[Abs[Sin[1/x]],{x,0,1},PerformanceGoal->"Quality"]]

Emphasize performance, possibly at the cost of quality:

Timing[LogPlot[Abs[Sin[1/x]],{x,0,1},PerformanceGoal->"Speed"]]

OpenersExampleSubsection18(Spacer1)PlotLabel  (1)

Add an overall label to the plot:

LogPlot[Exp[x],{x,0,3},PlotLabel->"exponential function"]

OpenersExampleSubsection19(Spacer1)PlotLabels  (5)

Specify text to label curves:

LogPlot[{x^x,x!},{x,0,2π},PlotLabels->{x^x,x!}]

Place the labels above the curves:

LogPlot[{x^Sin[x],x^Cos[x]},{x,0,2π},PlotLabels->Placed["Expressions",Above]]

Place the labels differently for each curve:

LogPlot[{x^Sin[x],x^Cos[x]},{x,0,2π},PlotLabels->{Placed[x^Sin[x],Below],Placed[x^Cos[x],Above]}]

(RefLink[PlotLabels, paclet:ref/PlotLabels])->"Expressions" uses functions as curve labels:

LogPlot[{Exp[x],x^2},{x,1,2π},PlotLabels->"Expressions"]

Use callouts to identify the curves:

LogPlot[{x^Sin[x],x^Cos[x]},{x,0,2π},PlotLabels->{Callout[x^Sin[x],Below],Callout[x^Cos[x],Above]}]

Use (RefLink[None, paclet:ref/None]) to not add a label:

LogPlot[{x^Sin[x],x^Cos[x]},{x,0,2π},PlotLabels->{x^Sin[x],None}]

OpenersExampleSubsection20(Spacer1)PlotLegends  (7)

No legends are used by default:

LogPlot[{x^x,x!},{x,1,10}]

Create a legend based on the functions:

LogPlot[{x^x,x!},{x,1,10},PlotLegends->"Expressions"]

Create a legend with placeholder text:

LogPlot[{x^x,x!},{x,1,10},PlotLegends->Automatic]

Create a legend with specific labels:

LogPlot[{x^x,x!},{x,1,10},PlotLegends->{"one","two"}]

(RefLink[PlotLegends, paclet:ref/PlotLegends]) picks up (RefLink[PlotStyle, paclet:ref/PlotStyle]) values automatically:

LogPlot[{x^x,x!},{x,1,10},PlotStyle->{Red,Blue},PlotLegends->Automatic]

Use (RefLink[Placed, paclet:ref/Placed]) to position legends:

LogPlot[{x^x,x!},{x,1,10},PlotStyle->{Red,Blue},PlotLegends->Placed[Automatic,Below]]

Place legends inside:

LogPlot[{x^x,x!},{x,1,10},PlotStyle->{Red,Blue},PlotLegends->Placed[Automatic,{0.25,0.75}]]

Use (RefLink[LineLegend, paclet:ref/LineLegend]) to modify the appearance of the legend:

LogPlot[{x^x,x!},{x,1,10},PlotLegends->LineLegend["Expressions",LegendFunction->Frame]]

OpenersExampleSubsection21(Spacer1)PlotPoints  (1)

Use more initial points to get a smoother curve:

Table[LogPlot[x^Sin[x],{x,0,10},PlotPoints->i,MaxRecursion->0],{i,{5,10,15,25}}]

OpenersExampleSubsection22(Spacer1)PlotRange  (2)

Show the curve over the whole domain:

LogPlot[x,{x,-5,5},PlotRange->Full]

Show the curve only where it is positive:

LogPlot[x,{x,-5,5},PlotRange->Automatic]

OpenersExampleSubsection23(Spacer1)PlotStyle  (6)

Use different style directives:

Table[LogPlot[x^Sin[x],{x,0,10},PlotStyle->ps],{ps,{Red,Thick,Dashed,Directive[Red,Thick]}}]

By default, different styles are chosen for multiple curves:

LogPlot[{1/x,x,x^x},{x,0,3}]

Explicitly specify the style for different curves:

LogPlot[{1/x,x,x^x},{x,0,3},PlotStyle->{Red,Green,Blue}]

(RefLink[PlotStyle, paclet:ref/PlotStyle]) can be combined with (RefLink[ColorFunction, paclet:ref/ColorFunction]):

LogPlot[x^Sin[x],{x,0,10},PlotStyle->Thick,ColorFunction->Function[{x,y},Hue[x]]]

(RefLink[PlotStyle, paclet:ref/PlotStyle]) can be combined with (RefLink[MeshShading, paclet:ref/MeshShading]):

LogPlot[x^Sin[x],{x,0,10},PlotStyle->Directive[Opacity[0.5],Thick],Mesh->10,MeshFunctions->{#1&},MeshShading->{Red,Blue}]

(RefLink[MeshStyle, paclet:ref/MeshStyle]) by default uses the same style as (RefLink[PlotStyle, paclet:ref/PlotStyle]):

LogPlot[x^Sin[x],{x,0,10},PlotStyle->Red,Mesh->All]

OpenersExampleSubsection24(Spacer1)PlotTheme  (2)

Use a theme with simple ticks and grid lines in a high-contrast color scheme:

LogPlot[{Sin[x],Cos[x]},{x,0,2Pi},PlotTheme->"Business"]

Change the color scheme:

LogPlot[{Sin[x],Cos[x]},{x,0,2Pi},PlotTheme->"Business",PlotStyle->96]

OpenersExampleSubsection25(Spacer1)RegionFunction  (2)

Show the curve where (π/2)<x (mod π)<π:

LogPlot[x^Sin[x],{x,0,8Pi},RegionFunction->Function[{x,y},Pi/2<Mod[x,Pi]<Pi]]

Exclude the region where (1/2)<y<2:

LogPlot[x^Sin[x],{x,0,20},RegionFunction->Function[{x,y},Not[1/2<y<2]]]

OpenersExampleSection3(Spacer1)Applications  (3)

Some typical algorithm complexities:

LogPlot[Tooltip@{Log[n],n,n Log[n],n^2},{n,10,10^3}]

Compute the time-discrete Fourier transform of a sequence:

h=ZTransform[n Sin[n/3],n,Exp[I ω]]

Log plot of the amplitude spectrum:

LogPlot[Abs[h],{ω,0,2Pi},Ticks->{Range[0,2Pi,Pi/2],Automatic}]

The supersonic intensity variation over a plane for a point source:

LogPlot[Abs[BesselJ[1,x] Sin[x]/x^2],{x,-10,10},AxesLabel->{k ρ, "dB" Log[10]/10}]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

(RefLink[LogPlot, paclet:ref/LogPlot]) samples more points where it needs to:

LogPlot[x^Sin[x],{x,0,10},Mesh->All]

(RefLink[LogPlot, paclet:ref/LogPlot]) is a special case of (RefLink[Plot, paclet:ref/Plot]) for curves:

{LogPlot[x^Sin[x],{x,0,10}],Plot[Log[x^Sin[x]],{x,0,10},AxesOrigin->{0,-1.5}]}

Use (RefLink[LogLinearPlot, paclet:ref/LogLinearPlot]) and (RefLink[LogLogPlot, paclet:ref/LogLogPlot]) for logarithmic plots in the x direction:

LogLogPlot[Abs[10^2/((I ω)^2+100)],{ω,10^0,10^5}]

Use (RefLink[ListLogPlot, paclet:ref/ListLogPlot]) for data:

{ListLogPlot[Table[{x,x^Sin[x]},{x,0,10,0.25}]],LogPlot[x^Sin[x],{x,0,10}]}//Quiet

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ListLogPlot, paclet:ref/ListLogPlot])  ▪  (RefLink[LogLinearPlot, paclet:ref/LogLinearPlot])  ▪  (RefLink[LogLogPlot, paclet:ref/LogLogPlot])  ▪  (RefLink[Plot, paclet:ref/Plot])  ▪  (RefLink[ParametricPlot, paclet:ref/ParametricPlot])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Some Special Plots, paclet:tutorial/SomeSpecialPlots])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Function Visualization, paclet:guide/FunctionVisualization])}, {▪(RefLinkPlain[System Model Analytics & Design, paclet:guide/SystemModelAnalyticsDesign])}})}})