Schrift wird kleiner in Grafik

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: Schrift wird kleiner in Grafik

von forenthomas » Mo 26. Aug 2019, 17:24

Hallo Bartman,

danke!! Und das mit dem Schnittpunkt konnte ich auch mal, man vergisst so viel.

Gruß, Thomas

P.S. Ich habe gerade das Bild der Mischung von Bart Simpson und Batman vor Augen - sehr lustig. :)

von Bartman » Mo 26. Aug 2019, 14:49

Mit der zusätzlichen Angabe der Option transform shape passiert das nicht:
\documentclass[parskip=half]{scrartcl}% Papierformat und Schriftgröße sind die Voreinstellung
\usepackage{pgfplots}% lädt tikz

\pgfplotsset{compat=1.16}
\usepgfplotslibrary{fillbetween}

\begin{document}
\begin{center}
\begin{tikzpicture}[scale=0.7, transform shape]
  \begin{axis}[
      axis lines=middle,
      domain=0:42,
      axis on top
    ]
     \addplot [name path = N] {-0.8*\x+38.5} node[pos = 0.18,anchor = south west] {$y = -0.8x + 38.5$};
     \addplot [name path = A] {0.9*\x+4.5} node[pos = 0.2,anchor = north west] {$y = 0.9x + 4.5$};
     \path [name intersections={of=N and A}];
     \draw [name path = T1, dotted] (current axis.origin|-intersection-1) -- (intersection-1);
     \addplot [gray!20] fill between [of=N and T1];
   \end{axis}
\end{tikzpicture}  
\end{center}

\begin{center}
\begin{tikzpicture}[scale=0.7]
  \begin{axis}[
      axis lines=middle,
      domain=0:42
    ]
     \addplot [name path = N] {-0.8*\x+38.5} node[pos = 0.18,anchor = south west] { $y = -0.8x + 38.5$};
     \addplot [name path = A] {0.9*\x+4.5} node[pos = 0.2,anchor = north west] {$y = 0.9x + 4.5$};
   \end{axis}
\end{tikzpicture}
\end{center}
\end{document}
Man kann den Schnittpunkt auch berechnen lassen, statt ihn von Hand einzugeben.

Schrift wird kleiner in Grafik

von forenthomas » Mo 26. Aug 2019, 12:42

Hallo,

ich komme irgendwie nicht klar mit der Schriftgröße in Grafiken. Jetzt habe ich mal ein konkretes Beispiel:

Wenn ich in der Grafik eine (oder die?) Fläche füllen lasse, dann wird die Schrift vergrößert. Warum? Und wie kann ich das verhindern? Im Moment hantiere ich dann immer noch pro Grafik mit relativen Schriftgrößen (tiny, scriptsize und so) rum, aber das kann's ja irgendwie nicht sein. Wie geht ihr mir Schriftgrößen in Grafiken um?


\documentclass[a4paper, parskip=half, 11pt]{scrartcl}

\usepackage{tikz}           
\usepackage{pgfplots}        
	\pgfplotsset{compat=1.16}
	\usepgfplotslibrary{fillbetween}

\begin{document}

\begin{center}
\begin{tikzpicture}[scale=0.7]
  \begin{axis}[
      axis lines=middle,
      domain=0:42, 
    ]
  	\addplot[name path = N] {-0.8*\x+38.5} node[pos = 0.18,anchor = south west] { $y = -0.8x + 38.5$};
  	\addplot[name path = A] {0.9*\x+4.5} node[pos = 0.2,anchor = north west] {$y = 0.9x + 4.5$};
  	\addplot[name path = T1,domain=0:20, dotted] {22.5};
  	\addplot[gray!20] fill between [of=N and T1, soft clip={domain=0:20}];
   \end{axis}
\end{tikzpicture}  
\end{center}

\begin{center}
\begin{tikzpicture}[scale=0.7]
  \begin{axis}[
      axis lines=middle,
      domain=0:42, 
    ]
  	\addplot[name path = N] {-0.8*\x+38.5} node[pos = 0.18,anchor = south west] { $y = -0.8x + 38.5$};
  	\addplot[name path = A] {0.9*\x+4.5} node[pos = 0.2,anchor = north west] {$y = 0.9x + 4.5$};
   \end{axis}
\end{tikzpicture}  
\end{center}

\end{document}
Für jeden Erkenntnisgewinn dankbar,
Thomas

Nach oben