LogPlot

LogPlot[f,{x,xmin,xmax}]

generates a log plot of f as a function of x from xmin to xmax.

LogPlot[{f1,f2,},{x,xmin,xmax}]

plots several functions fi.

LogPlot[{,w[fi],},]

plots fi with features defined by the symbolic wrapper w.

LogPlot[,{x}reg]

takes the variable x to be in the geometric region reg.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Plot a function with a logarithmically scaled axis:

Plot several functions:

Label each curve:

Fill between curves:

Scope  (30)

Sampling  (7)

More points are sampled when the function changes quickly:

The plot range is selected automatically:

Ranges where the function becomes negative are excluded:

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

Use Exclusions->None to draw a connected curve:

Use PlotPoints and MaxRecursion to control adaptive sampling:

Use PlotRange to focus in on areas of interest:

Plot over an infinite domain with automatic ticks:

Labeling and Legending  (11)

Label curves with Labeled:

Place the labels relative to the curves:

Label curves with PlotLabels:

Place the label near the curve at an value:

Use a scaled position:

Specify the text position relative to the point:

Label curves automatically with Callout:

Place labels at specific locations:

Include legends for each curve:

Use Legended to provide a legend for a specific curve:

Use Placed to change the legend location:

Curves usually have interactive callouts showing the coordinates when you mouse over them:

Including specific wrappers or interactions, such as tooltips, turns off the interactive features:

Choose from multiple interactive highlighting effects:

Use Highlighted to emphasize specific points in a plot:

Highlight multiple points:

Presentation  (12)

Multiple curves are automatically colored to be distinct:

Provide explicit styling to different curves:

Create legends from the functions:

Specify labels for legends:

Add labels:

Provide an interactive Tooltip for each curve:

Create filled plots:

Create an overlay mesh:

Style the curve segments between mesh points:

Use a plot theme:

Show multiple curves in a row of separate panels:

Use a column instead of a row:

Use multiple rows or columns:

Use ScalingFunctions to reverse the y axis:

Scale only the x axis:

Options  (91)

ClippingStyle  (4)

Omit clipped regions of the plot:

Show clipped regions with red lines:

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

Show clipped regions as red and thick:

ColorFunction  (6)

Color by scaled coordinate and scaled coordinate, respectively:

Color with a named color scheme:

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

Fill with the color used for the curve:

ColorFunction has higher priority than PlotStyle for coloring the curve:

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

ColorFunctionScaling  (3)

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

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

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

EvaluationMonitor  (3)

Find the list of values sampled by LogPlot:

Show where LogPlot evaluates the function:

Count how many times the function is evaluated:

Exclusions  (2)

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

Indicate that no exclusions should be computed:

ExclusionsStyle  (2)

Use dashed lines to indicate the vertical asymptotes:

Use blue points to highlight the exclusions:

Filling  (7)

Use symbolic or explicit values:

Overlapping fills by default combine using opacity:

Fill between curve 1 and the axis:

Fill between curves 1 and 2:

Fill between curves 1 and 2 with a specific style:

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

Fill between curves 1 and with yellow:

FillingStyle  (3)

Use different fill colors:

Fill with opacity 0.5 yellow:

Fill with red below and blue above:

LabelingSize  (4)

Textual labels are shown at their actual sizes:

Image labels are automatically resized:

Specify a maximum size for textual labels:

Specify a maximum size for image labels:

Show image labels at their natural sizes:

MaxRecursion  (2)

The default sampling mesh:

Each level of MaxRecursion will subdivide the initial mesh into a finer mesh:

Mesh  (3)

Show the initial and final sampling meshes:

Use 20 mesh levels evenly spaced in the direction:

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

MeshFunctions  (4)

Use a mesh evenly spaced in the and directions:

Mesh functions use the unscaled values in the direction:

Use Log to scale the mesh functions in the direction:

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

MeshShading  (6)

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

Use None to remove segments:

MeshShading can be used with PlotStyle:

MeshShading has higher priority than PlotStyle for styling the curve:

Use PlotStyle for some segments by setting MeshShading to Automatic:

MeshShading can be used with ColorFunction:

MeshStyle  (4)

Color the mesh the same color as the plot:

Use a red mesh in the direction:

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

Use big red mesh points in the direction:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotHighlighting  (8)

Plots have interactive coordinate callouts with the default setting PlotHighlightingAutomatic:

Use PlotHighlightingNone to disable the highlighting for the entire plot:

Use Highlighted[,None] to disable highlighting for a single curve:

Move the mouse over the curve to highlight it with a ball and label:

Use a ball and label to highlight a specific point on the curve:

Move the mouse over the curve to highlight it with a label and droplines to the axes:

Use a ball and label to highlight a specific point on the curve:

Move the mouse over the plot to highlight it with a slice showing values corresponding to the position:

Highlight the curves at a fixed value:

Move the mouse over the plot to highlight it with a slice showing values corresponding to the position:

Use a component that shows the points on the curve closest to the position of the mouse cursor:

Specify the style for the points:

Use a component that shows the coordinates on the curve closest to the mouse cursor:

Use Callout options to change the appearance of the label:

Combine components to create a custom effect:

PlotLabel  (1)

Add an overall label to the plot:

PlotLabels  (5)

Specify text to label curves:

Place the labels above the curves:

Place the labels differently for each curve:

PlotLabels->"Expressions" uses functions as curve labels:

Use callouts to identify the curves:

Use None to not add a label:

PlotLegends  (7)

No legends are used by default:

Create a legend based on the functions:

Create a legend with placeholder text:

Create a legend with specific labels:

PlotLegends picks up PlotStyle values automatically:

Use Placed to position legends:

Place legends inside:

Use LineLegend to modify the appearance of the legend:

PlotPoints  (1)

Use more initial points to get a smoother curve:

PlotRange  (2)

Show the curve over the whole domain:

Show the curve only where it is positive:

PlotStyle  (6)

Use different style directives:

By default, different styles are chosen for multiple curves:

Explicitly specify the style for different curves:

PlotStyle can be combined with ColorFunction:

PlotStyle can be combined with MeshShading:

MeshStyle by default uses the same style as PlotStyle:

PlotTheme  (2)

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

Change the color scheme:

RegionFunction  (2)

Show the curve where :

Exclude the region where :

ScalingFunctions  (2)

By default, the y axis has a log scale:

Use a scale in both axes:

Applications  (3)

Some typical algorithm complexities:

Compute the time-discrete Fourier transform of a sequence:

Log plot of the amplitude spectrum:

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

Properties & Relations  (4)

LogPlot samples more points where it needs to:

LogPlot is a special case of Plot for curves:

Use LogLinearPlot and LogLogPlot for logarithmic plots in the direction:

Use ListLogPlot for data:

Wolfram Research (2007), LogPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/LogPlot.html (updated 2023).

Text

Wolfram Research (2007), LogPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/LogPlot.html (updated 2023).

CMS

Wolfram Language. 2007. "LogPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/LogPlot.html.

APA

Wolfram Language. (2007). LogPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LogPlot.html

BibTeX

@misc{reference.wolfram_2023_logplot, author="Wolfram Research", title="{LogPlot}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/LogPlot.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_logplot, organization={Wolfram Research}, title={LogPlot}, year={2023}, url={https://reference.wolfram.com/language/ref/LogPlot.html}, note=[Accessed: 19-March-2024 ]}