pythontikz.common

This module implements the classes used to show plots.

class pythontikz.common.TikzOptions(*args, **kwargs)[source]

Bases: pythontikz.base_classes.command.Options

Options class, do not escape.

Parameters:
  • *args – Positional parameters
  • **kwargs – Keyword parameters
append_positional(option)[source]

Add a new positional option.

class pythontikz.common.TikzLibrary(name, options=None)[source]

Bases: pylatex.package.Package

Wrapper for package command for inclusion of tikz libraries. Allows automatic detection of some tikz libraries.

Parameters:
  • name (str) – Name of the package.
  • options (str, list or Options) – Options of the package.
class pythontikz.common.TikzPicture(*, options=None, arguments=None, start_arguments=None, **kwargs)[source]

Bases: pylatex.base_classes.containers.Environment

Basic TikZ container class.

Parameters:
  • options (str or list or Options) – Options to be added to the \begin command
  • arguments (str or list or Arguments) – Arguments to be added to the \begin command
  • start_arguments (str or list or Arguments) – Arguments to be added before the options
omit_if_empty = False
class pythontikz.common.Axis(options=None, *, data=None)[source]

Bases: pylatex.base_classes.containers.Environment

PGFPlots axis container class, this contains plots.

Parameters:options (str, list or Options) – Options to format the axis environment.
omit_if_empty = False
class pythontikz.common.TikzScope(*, options=None, arguments=None, start_arguments=None, **kwargs)[source]

Bases: pylatex.base_classes.containers.Environment

TikZ Scope Environment.

Parameters:
  • options (str or list or Options) – Options to be added to the \begin command
  • arguments (str or list or Arguments) – Arguments to be added to the \begin command
  • start_arguments (str or list or Arguments) – Arguments to be added before the options
omit_if_empty = False
class pythontikz.common.TikzObject(options=None)[source]

Bases: pylatex.base_classes.containers.Container

Abstract Class that some TikZ Objects inherits from.

Parameters:options (list) – Options pertaining to the object
get_anchor_point(anchor_name)[source]

Return an anchor point of the node, if it exists.

class pythontikz.common.Plot(name=None, func=None, coordinates=None, error_bar_deltas=None, options=None, use_auto_format=True)[source]

Bases: pylatex.base_classes.latex_object.LatexObject

A class representing a PGFPlot.

Parameters:
  • name (str) – Name of the plot.
  • func (str) – A function that should be plotted.
  • coordinates (list) – A list of exact coordinates tat should be plotted.
  • error_bar_deltas (list) – A list of (x,y) pairs for each coordinate indicating the +/- error amount.
  • options (str, list or Options) –
  • use_auto_format (bool) – Boolean for whether pgfplot is called as addplot or addplot+ which controls whether unspecified options are set automatically. Set pdfplots manual for details.
class pythontikz.common.TikzAnchor(node_handle, anchor_name)[source]

Bases: pylatex.base_classes.latex_object.LatexObject

Representation of a node’s anchor point.

Parameters:
  • node_handle (str) – Node’s identifier
  • anchor_name (str) – Name of the anchor