Tag
Pgfplots
- What Does \addplot+ Do in PGFPlots?In PGFPlots, \addplot+ retains the active cycle-list style and adds local options, while \addplot uses supplied options instead of that style.
- How to Plot a Parametric Curve in PGFPlotsPlot a two-dimensional parametric curve in PGFPlots by sampling a parameter and supplying its x- and y-coordinate expressions as a pair.
- How to Set Axis Parameters in a TikZ/PGFPlots FigureSet plot limits, labels, ticks, grid, and size with key-value options in PGFPlots’ axis environment, not the outer tikzpicture options.
- How to Make a Symmetric Logarithmic Axis in PGFPlotsPGFPlots has no built-in symlog axis mode, but you can transform x coordinates and label ticks with their original values.
- How to Crop a PGFPlots Figure with the Standalone ClassUse the standalone class to crop a PGFPlots figure to its TikZ bounding box, then control outer margins and axis whitespace with the right options.
- How to Fix a Shell-Escape Error with PGFPlotsA PGFPlots shell-escape error usually means your document is launching an external command. Find the trigger, then enable shell escape or remove it.
- How to Use the Same Color with Different Bar Patterns in PGFPlotsUse TikZ’s patterns library and set pattern and pattern color on each PGFPlots bar series to distinguish bars without changing their color.
- How to Use xtick, xticklabels, and extra x ticks in PGFPlotsUse xtick and xticklabels to control ordinary x-axis ticks, and extra x ticks with extra x tick labels to add separately positioned ticks in PGFPlots.
- Why Are PGFPlots ybar Patterns Not Showing?Make PGFPlots bar patterns visible by loading TikZ’s patterns library, setting a pattern and pattern color, and checking for conflicting fill styles.
- How to Combine skip coords and each nth point in PGFPlotsCombine PGFPlots’ skip coords between index and each nth point options to omit a data range and thin the remaining plotted coordinates.
- How to Make a PGFPlots Contour Plot from Matrix DataPlot matrix data as a PGFPlots color map by supplying x, y, and z values, setting mesh/rows, and adding contour levels.
- How to Set the Sampling Step Size in PGFPlotsPGFPlots has no direct step-size key for function plots; calculate the sample count from the domain length and desired spacing.
- How to Make a Broken Y-Axis in PGFPlotsCreate a broken y-axis in PGFPlots by stacking two aligned axes with different y limits, matching x limits, and a visible gap.
- How to Align Histogram x-Ticks to the Left of Each Bin in PGFPlotsUse PGFPlots' ybar interval style and place xtick values at bin boundaries to align x-axis ticks with the left edges of histogram bins.
- How to Set a PGFPlots Search Path for Data FilesUse PGFPlots’ table/search path key to find data files in a directory, rather than graphicx’s graphicspath, which is for images.
- How to Make a PGFPlots Function Touch the Plot EdgesSet explicit PGFPlots axis limits and match the function domain to them to draw a curve up to the plot edges.
- Why Are Some PGFPlots Histogram Series Not Showing?If PGFPlots shows only one histogram series, overlapping opaque bars are often hiding the others; use shared bins and transparent, distinct fills.
- How to Write Square Brackets in a pgfplots Axis LabelWrite square brackets in a pgfplots xlabel or ylabel by enclosing the entire label value in braces, such as xlabel={Time [s]}.
- How to Change the Anchor of a TikZ or PGFPlots PinSet the anchor of an individual TikZ or PGFPlots pin with per-pin options, or style every pin consistently; includes a compilable example.
- How to Make the x-Axis Smaller in PGFPlotsMake a PGFPlots x-axis physically narrower with the width option, and use scale only axis to control whether labels count toward that width.
- How to Combine PGFPlots with One Legend and Rotate ThemArrange multiple PGFPlots panels with one shared legend, then rotate the complete graphic using graphicx’s rotatebox command.
- How to Make a TikZ Picture a SubfigurePut each TikZ drawing inside a subfigure environment from the subcaption package to give panels individual captions and references.
- How to Control the Layout of Bar Charts in LaTeXUse PGFPlots to arrange bars as grouped or stacked series, control spacing and labels, and place multiple bar charts side by side with groupplots.
- How to Fix PGFPlots Out-of-Memory Errors with Large Data FilesLearn why large PGFPlots tables exhaust TeX memory, how to reduce the data, and when externalization or engine settings can help.
- How to Plot Inverse Hyperbolic Functions in PGFPlotsPlot inverse hyperbolic functions in PGFPlots by declaring them with logarithm and square-root formulas, and restricting each plot to its domain.
- How to Include a Matplotlib Figure in LaTeXSave a complex Matplotlib figure as PDF, then include it in LaTeX with graphicx. Use PNG only when raster output is required.
- How to Make Dotted Grid Lines in pgfplotsUse grid style={dotted} in pgfplots, with grid=both and minor tick settings when you need dotted major and minor grids.
- How to Make a Vertical Box Plot Horizontal in PGFPlotsRotate a PGFPlots box plot by setting boxplot/draw direction=x, then place category labels on the y-axis and values on the x-axis.
- How Do You Determine a Line’s Slope in PGFPlots?Calculate a PGFPlots line’s slope from its data coordinates; learn why automatic axis scaling changes its appearance and how to show it accurately.
- How to Choose and Change a 3D View in TikZSet TikZ's projected x, y, and z directions to change a 3D drawing's view; use pgfplots' view option for plotted 3D data.
- How to Extend the X-Axis in a PGFPlots GraphIn PGFPlots, set xmin and xmax to control the visible x-range; use enlarge x limits for automatic padding, and distinguish limits from plot domain.
- How to Plot CSV Columns with pgfplotsinvokeforeachRead a comma-separated file with pgfplotstable, then use pgfplotsinvokeforeach to plot selected columns against a shared x-column.
- How to Draw a PGFPlots Boxplot from One Data RowTo plot one data row as a PGFPlots boxplot, extract its values into a column and pass that column to the boxplot plot handler.
- How to Draw a Spline with PGFPlotsUse PGFPlots' smooth option to draw a curve through coordinate points, and learn when you need a mathematically defined cubic spline instead.
- How to Draw the Same Angles in pgfplots and TikZMake angles in pgfplots match TikZ by using equal x- and y-unit lengths, then place angle markers at axis coordinates.
- How to Plot Different Scales on the Same PGFPlots FigurePlot data with different y-scales in PGFPlots by overlaying two aligned axes with a shared x-range and separate y-limits.
- How to Make a Variation Table and Graph of ln(x) in TikZBuild a LaTeX variation table for ln(x) and plot its graph with TikZ and PGFPlots using a complete example, with domain and monotonicity notes.
- How to Repeat a PGFPlots Style Every n PlotsTo repeat a PGFPlots style every n plots, define a custom cycle list with repeated style entries; each addplot uses the next entry.
- How to Define a Function Once in PGFPlotsDeclare a PGF math function once, then use it for numerical calculations and ordinary PGFPlots curves without duplicating its formula.
- How to Annotate a Slope Triangle in a PGFPlots AxisDraw a slope triangle in a PGFPlots axis with axis-coordinate segments and labels for the run, rise, and calculated slope.
- How to Add a Label to a Plot in PGFPlotsIn PGFPlots, label a curve with \addlegendentry or annotate a point with a TikZ node placed at an axis coordinate.
- How to Add Error Bars to a Bar Plot in PGFPlotsAdd vertical error bars to a PGFPlots bar chart with y dir=both and y explicit, then provide each bar’s value and uncertainty.
- How to Add a Vertical Line to a TikZ PlotAdd a vertical line to a PGFPlots graph with a two-point coordinate plot, or draw it in axis coordinates for precise placement.
- Why Does a PGFPlots Cycle List Produce No Colors?Define each PGFPlots cycle-list entry as a plot style, select the list by name, and use \addplot+ to preserve its colors when adding options.
- How to Set Line Colors in PGFPlotsSet one PGFPlots line with a draw color, or define a cycle list to assign repeatable colors and styles to multiple plotted series.
- How to Position Tick Scale Labels in pgfplotsPosition pgfplots’ tick scale multiplier with the x or y tick scale label style key, or move individual tick numbers with xticklabel pos and yticklabel pos.
- How to Set a Colormap for Bars in PGFPlotsA PGFPlots colormap does not automatically recolor every bar in one ybar plot. Split bars into plots for distinct colors, or set one fill explicitly.
- How to Fill the Region Between Two Lines in TikZUse PGFPlots’ fillbetween library to shade the area between named plot paths, with a complete example and notes on domains and intersections.