ToTikzPlotExtension
This class provides methods to generate plots with TikZ.
public static class ToTikzPlotExtension
Inheritance Object → ToTikzPlotExtension
Fields
DefaultColorList
Default colors.
public static List<string> DefaultColorList;
Methods
GetDefaultColors(Int32)
Get a list of n
colors from the default ones.
If n
is more than the number of default colors, they are repeated.
public static List<string> GetDefaultColors(int n)
Parameters
n
Int32
Returns
GetDefaultNames(Int32, Char)
Get a list of n
default names.
These are lowercase letters, e.g., {f, g, h}.
public static List<string> GetDefaultNames(int n, char firstLetter)
Parameters
n
Int32
The number of names to return.
firstLetter
Char
The starting letter, defaults to 'f'.
Returns
GetDefaultLineStyles(Int32)
Get a list of n
default line styles.
public static List<string> GetDefaultLineStyles(int n)
Parameters
n
Int32
Returns
ComputePlotEnd(IReadOnlyList<Curve>, PlotEndStrategy, Nullable<Rational>)
Computes the x-axis right boundary.
public static Rational ComputePlotEnd(IReadOnlyList<Curve> curves, PlotEndStrategy strategy, Nullable<Rational> upTo)
Parameters
curves
IReadOnlyList<Curve>
The curves to be plotted.
strategy
PlotEndStrategy
Computation strategy, defaults to TwoPeriodsEach.
upTo
Nullable<Rational>
The preferred right boundary. If it is 0, it will be overridden.
Returns
ToTikzPlot(IReadOnlyList<Curve>, IReadOnlyList<String>, IReadOnlyList<String>, IReadOnlyList<String>, TikzLayoutSettings, PlotEndStrategy, Nullable<Rational>)
Plots the curves using TikZ.
public static string ToTikzPlot(IReadOnlyList<Curve> curves, IReadOnlyList<string> names, IReadOnlyList<string> colors, IReadOnlyList<string> lineStyles, TikzLayoutSettings settings, PlotEndStrategy plotEndStrategy, Nullable<Rational> upTo)
Parameters
curves
IReadOnlyList<Curve>
names
IReadOnlyList<String>
colors
IReadOnlyList<String>
lineStyles
IReadOnlyList<String>
settings
TikzLayoutSettings
plotEndStrategy
PlotEndStrategy
upTo
Nullable<Rational>
Returns
String
A string with the TikZ code of the plot. Can be written to file and compiled with LaTeX.
ToTikzPlot(Curve, String, String, String, TikzLayoutSettings, PlotEndStrategy, Nullable<Rational>)
Plots the curve using TikZ.
public static string ToTikzPlot(Curve curve, string name, string color, string lineStyle, TikzLayoutSettings settings, PlotEndStrategy plotEndStrategy, Nullable<Rational> upTo)
Parameters
curve
Curve
name
String
color
String
lineStyle
String
settings
TikzLayoutSettings
plotEndStrategy
PlotEndStrategy
upTo
Nullable<Rational>
Returns
String
A string with the TikZ code of the plot. Can be written to file and compiled with LaTeX.
ToTikzPlot(params Curve[])
Plots the curves using TikZ, using default settings.
public static string ToTikzPlot(params Curve[] curves)
Parameters
curves
Curve[]
Returns
String
A string with the TikZ code of the plot. Can be written to file and compiled with LaTeX.
GetUppMarks(Curve, String)
Computes the marks to denote the periodic behavior of the curve.
public static IEnumerable<string> GetUppMarks(Curve f, string name)
Parameters
f
Curve
name
String