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: Grafik

von Bartman » Do 15. Aug 2019, 19:26

Da bei dem Befehl \sum nur die Option scale und nicht font wirkt, habe ich ihn durch \Sigma ersetzt.
\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}[
%	scale=1.5,
	cross/.style={
		draw,  
		fill,
		minimum size=2*(#1-1pt), 
		circle, 
		inner sep=0pt, 
		outer sep=0pt
	},
	smaller caption/.style={font=\scriptsize}
]
   %Raster zeichnen
   %\draw [color=gray!50]  [step=5mm] (-.5,-.5) grid (3.5,3.5);
   % Achsen zeichnen
   \draw[->,thin] (0,0) -- (3.5,0) node[right, smaller caption] {$H_1$};
   \draw[->,thin] (0,0) -- (0,3.5) node[above, smaller caption] {$H_2$};
   % Achsen beschriften
%   \begin{scope}[font=\footnotesize]
   \foreach \x in {0,1, 3/2, 2, 7/3, 3}
   \draw (\x,-.1) -- (\x,.1) node[below=4pt] {$\scriptscriptstyle\x$};
   \foreach \y in {0,1, 3/2, 2, 3}
   \draw (-.1,\y) -- (.1,\y) node[left=4pt] {$\scriptscriptstyle\y$};
%   \end{scope}
   %Punkte einzeichnen:
   \node [cross=2pt] at (1,1) {};
   \node [cross=1pt] at (3/2, 1)(1) {};
   \node [cross=1pt] at (3/2, 3/2) (2){};
   \node [cross=1pt] at (7/3, 1) (3) {};
   \node [cross=2pt, label={[smaller caption]{$H(\sigma^{*})$}}] at (3, 3) (4) {};
   \node [cross=1pt] at (0, 1) (5) {};
   \node [cross=2pt] at (0, 0) (6) {};
   \node [cross=2pt] at (2, 0) (7) {};
   \node [cross=1pt] at (3.5, 1) (8) {};
   \node [cross=1pt] at (3/2, 0) (9) {};
   \node [cross=1pt] at (3/2, 3.5) (10) {};
   \draw [thick, fill=lightgray] 
	   (1.center) -- (2.center) -- (4.center) -- (3.center) -- cycle
   ;
   \path 
       (2.center) -- coordinate (midway2to3) (3.center)
       (midway2to3) -- node [pos=.1, smaller caption] {$H^{c}(\Sigma)$} (4.center)
   ;   
   \draw [dashed] 
      (5) -- (8) node [right] {$v_2$}
	   (9) -- (10) node [above] {$v_1$}
   ;
\end{tikzpicture} 
\end{document}

von mango1234 » Do 15. Aug 2019, 19:03

hab dazu geschrieben was kleiner gehört...
\documentclass[tikz]{standalone} 
\usetikzlibrary{positioning} 
\usepackage{pgfplots}


\usetikzlibrary{shapes.misc} 
\begin{document} 
\begin{tikzpicture}[ 
   cross/.style={ 
      draw,   
      fill, 
      minimum size=2*(#1-1pt), 
      circle, 
      inner sep=0pt, 
      outer sep=0pt 
   } 
] 

   %\draw [color=gray!50]  [step=5mm] (-.5,-.5) grid (3.5,3.5); 
   \draw[->,thin] (0,0) -- (3.5,0) node[right] {$H_{1}$}; %%das hier sollte klein sein
   \draw[->,thin] (0,0) -- (0,3.5) node[above] {$H_{2}$}; %%das hier sollte klein sein 
  
   \foreach \x in {0,1, 3/2, 2, 7/3, 3} 
   \draw (\x,-.1) -- (\x,.1) node[below=4pt] {$\scriptscriptstyle\x$}; 
   \foreach \y in {0,1, 3/2, 2, 3} 
   \draw (-.1,\y) -- (.1,\y) node[left=4pt] {$\scriptscriptstyle\y$}; 

   \node [cross=2pt] at (1,1) {}; 
   \node [cross=1pt] at (3/2, 1)(1) {}; 
   \node [cross=1pt] at (3/2, 3/2) (2){}; 
   \node [cross=1pt] at (7/3, 1) (3) {}; 
   \node [cross=2pt, label={$H(\sigma^{*})$}] at (3, 3) (4) {}; %%das hier sollte klein sein
   \node [cross=1pt] at (0, 1) (5) {}; 
   \node [cross=2pt] at (0, 0) (6) {}; 
   \node [cross=2pt] at (2, 0) (7) {}; 
   \node [cross=1pt] at (3.5, 1) (8) {}; 
   \node [cross=1pt] at (3/2, 0) (9) {}; 
   \node [cross=1pt] at (3/2, 3.5) (10) {}; 
   \draw [thick, fill=lightgray] 
      (1.center) -- (2.center) -- (4.center) -- (3.center) -- cycle 
   ; 
   \node [above right=3mm] at (1) {$H^{c}(\sum)$}; %%%das hier sollte klein sein
%\path (2.center) -- node {a} (3.center); 
   \draw [dashed] 
         (5) -- (8) node [right] {$v_{2}$} 
      (9) -- (10) node [above] {$v_{1}$} 
   ;    \draw [dashed] (9) -- (10);
\end{tikzpicture}
 
\end{document}

von Bartman » Do 15. Aug 2019, 18:57

Die Schriftgrößenbefehle haben kein Argument.

Meine Infos gelten auch für die Schriftgröße von z. B. H1 und H2.

Wenn Dir das nicht weiterhilft, musst Du einen Ausschnitt des nicht funktionierenden Quelltextes zeigen oder ein neues Beispiel anfertigen, welches das Problem nachvollziehbar macht.

von mango1234 » Do 15. Aug 2019, 18:31

nein nicht die zahlen sondern die Beschriftung ganz links beim Pfeil, das funktioniert mit \small{text) nicht

von Bartman » Do 15. Aug 2019, 18:24

Meinst Du mit Beschriftung die Zahlen an den Achsen? Die wurden schon verkleinert. Die Größenänderung kann auf Deine Weise oder andernfalls mit der Option font (siehe Paketdokumentation) bzw. durch einen Schriftgrößenbefehl als Schalter direkt beim Text im Argument des Knotens stattfinden.

von mango1234 » Do 15. Aug 2019, 18:10

danke weißt du zufällig auch wie ich die größe vom text in dem jetzt grauen Feld und die achsenbeschriftung ändern kann(kleiner)?

von Bartman » Do 15. Aug 2019, 17:18

Bei dem ersten Befehl zum Zeichnen einer der Linien der zu färbenden Fläche fehlt ein schließendes Semikolon.

Gerade wegen der Achsen ist der Einsatz des Pakets pgfplots ebenfalls denkbar.

Ohne einen größeren Umbau Deines Beispiels könntest Du diese Änderungen vornehmen:
\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}[
	cross/.style={
		draw,  
		fill,
		minimum size=2*(#1-1pt), 
		circle, 
		inner sep=0pt, 
		outer sep=0pt
	}
]
   %Raster zeichnen
   %\draw [color=gray!50]  [step=5mm] (-.5,-.5) grid (3.5,3.5);
   % Achsen zeichnen
   \draw[->,thick] (0,0) -- (3.5,0) node[right] {$H_{1}$};
   \draw[->,thick] (0,0) -- (0,3.5) node[above] {$H_{2}$};
   % Achsen beschriften
%   \begin{scope}[font=\footnotesize]
   \foreach \x in {0,1, 3/2, 2, 7/3, 3}
   \draw (\x,-.1) -- (\x,.1) node[below=4pt] {$\scriptscriptstyle\x$};
   \foreach \y in {0,1, 3/2, 2, 3}
   \draw (-.1,\y) -- (.1,\y) node[left=4pt] {$\scriptscriptstyle\y$};
%   \end{scope}
   %Punkte einzeichnen:
   \node [cross=2pt] at (1,1) {};
   \node [cross=1pt] at (3/2, 1)(1) {};
   \node [cross=1pt] at (3/2, 3/2) (2){};
   \node [cross=1pt] at (7/3, 1) (3) {};
   \node [cross=2pt, label={$H(\sigma^{*})$}] at (3, 3) (4) {};
   \node [cross=1pt] at (0, 1) (5) {};
   \node [cross=2pt] at (0, 0) (6) {};
   \node [cross=2pt] at (2, 0) (7) {};
   \node [cross=1pt] at (3.5, 1) (8) {};
   \node [cross=1pt] at (3/2, 0) (9) {};
   \node [cross=1pt] at (3/2, 3.5) (10) {};
   \draw [thick, fill=lightgray] 
	   (1.center) -- (2.center) -- (4.center) -- (3.center) -- cycle
   ;
   \node [above right=3mm] at (1) {a};
%   \path (2.center) -- node {a} (3.center);
   \draw [dashed] 
   		(5) -- (8) node [right] {Text}
		(9) -- (10) node [above] {Text}
   ;
\end{tikzpicture} 
\end{document}

Grafik

von mango1234 » Do 15. Aug 2019, 16:27

hallo, ich habe drei Fragen:
1. wie kann ich das Innere des Gebiets färben und etwas reinschreiben?
2. wie kann ich die strichlierten Linien beschriften (also die Beschriftung sollte am Ende der Linie sein)?
3. Wie kann ich die Achsenbeschriftung dünner machen?
LG
\documentclass[tikz]{standalone} 
\usetikzlibrary{positioning} 
\usepackage{pgfplots}


\usetikzlibrary{shapes.misc} 
\begin{document} 
\begin{tikzpicture}[cross/.style={draw,  
  minimum size=2*(#1-1pt), circle, inner sep=0pt, outer sep=0pt}] 
   %Raster zeichnen 
   %\draw [color=gray!50]  [step=5mm] (-.5,-.5) grid (3.5,3.5); 
   % Achsen zeichnen 
   \draw[->,thick] (0,0) -- (3.5,0) node[right] {$H_{1}$}; 
   \draw[->,thick] (0,0) -- (0,3.5) node[above] {$H_{2}$}; 
   % Achsen beschriften 
   \foreach \x in {0,1, 3/2, 2, 7/3, 3} 
   \draw (\x,-.1) -- (\x,.1) node[below=4pt] {$\scriptstyle\x$}; 
   \foreach \y in {0,1, 3/2, 2, 3} 
   \draw (-.1,\y) -- (.1,\y) node[left=4pt] {$\scriptstyle\y$}; 
   %Punkte einzeichnen: 
   \node [cross=2pt, fill] at (1,1) {}; 
   \node [cross=1pt, fill] at (3/2, 1)(1) {}; 
   \node [cross=1pt, fill] at (3/2, 3/2) (2){}; 
   \node [cross=1pt, fill] at (7/3, 1) (3) {};
   \node [cross=2pt, fill, label={$H(\sigma^{*})$}] at (3, 3) (4) {};
   \node [cross=1pt, fill] at (0, 1) (5) {};
   \node [cross=2pt, fill] at (0, 0) (6) {};
   \node [cross=2pt, fill] at (2, 0) (7) {};
   \node [cross=1pt, fill] at (3.5, 1) (8) {};
   \node [cross=1pt, fill] at (3/2, 0) (9) {};
   \node [cross=1pt, fill] at (3/2, 3.5) (10) {};
   \draw [thick] (1) -- (2)
   \draw [thick] (2) -- (4);
   \draw [thick] (3) -- (4);
   \draw [thick] (1) -- (3);
   \draw [dashed] (5) -- (8);
   \draw [dashed] (9) -- (10);
\end{tikzpicture}
 
\end{document}

Nach oben