2

Here my MWE:

\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions}

\begin{document}

Text \begin{figure} \centering \begin{tikzpicture} \datavisualization[ scientific axes = clean, x axis = { label = {$\varepsilon$, einheitenlos} }, y axis = { label = {$\epsilon$, in V} }, visualize as smooth line = func, func = { label in legend = {text = $\epsilon(\varepsilon)$} } ] data[format = function] { var x : interval[0 : .9]; func y = 1 / (1 - \value x) ^ 2; }; \end{tikzpicture} \end{figure}

\end{document}

And the result:

result

Can one have the default fontsize of the documentclass (11pt in case of scrartcl, see the KOMA-Script manual on page 59) for both the figure (tics labels, legend and axis labels) and document text. The best solution for me would be to set up it with TikZ datavisualization options in the document preamble, but I didn't found anything about it in the TikZ manual. So is it possible? If not, than other solutions are welcome too.

Thank you for your help and effort in advance!

Su-47
  • 2,508
  • 1
    How about \documentclass[20pt]{scrartcl}? – Matthias Arras Oct 06 '20 at 14:36
  • Hello @Matthias Arras! Thank you for your comment! My bad: My question wasn't precise enought. I wish for both the figure and the document text the default fontsize of the documentclass. This means I have to set up it with TikZ datavisualization options, but I didn't found anything about it in the TikZ manual. I updated my question. – Su-47 Oct 08 '20 at 07:58

1 Answers1

3

You can make datavisualization use the normal font size everywhere by adding

\tikzdatavisualizationset{
  use default font/.style={node style={font=}},
  every data set label/.append style={use default font},
  every axis label/.append style={use default font},
  every ticks/.append style={use default font},
  every legend inside/.append style={label style={use default font}},
}

to your preamble.

The defaults are

  • \small for data set labels and axis labels,
  • \footnotesize for ticks and legend inside.

TikZ defaults are pretty good, as a rule, so be careful when changing them.

schtandard
  • 14,892