quiverkartesisch in polaraxisumgebung
Verfasst: Sa 3. Okt 2015, 01:27
Hallo,
ich möchte in pgfplots in ein poolares Koordinatensystem
mit quiver ein Vektorfeld kartesische eingeben. Als test hatte ich ein Beispiel
mit einem Kartesischen und einen polaren koordiantensystem verglichen, leider kommt nicht das gleiche raus
Ich wollte gerne das poolare Koordinatensystem verwenden, da ich es ganz komfortabel finde, dass ich gleich die Grad Zahlen dabei habe.
mir kommt es so vor, als würde in quiver die Richtung u,v vom Vektor nicht kartesisch sein.
ich möchte in pgfplots in ein poolares Koordinatensystem
mit quiver ein Vektorfeld kartesische eingeben. Als test hatte ich ein Beispiel
mit einem Kartesischen und einen polaren koordiantensystem verglichen, leider kommt nicht das gleiche raus

Ich wollte gerne das poolare Koordinatensystem verwenden, da ich es ganz komfortabel finde, dass ich gleich die Grad Zahlen dabei habe.
mir kommt es so vor, als würde in quiver die Richtung u,v vom Vektor nicht kartesisch sein.
\documentclass[11pt,a4paper,fleqn]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{changepage} \usepackage{booktabs} \usepackage{geometry} \usepackage{hyperref} \usepackage{ifthen} \usepackage{todonotes} \usepackage[ngerman]{babel} \geometry{a4paper, top=30mm, left=30mm, right=30mm, bottom=30mm, headsep=10mm, footskip=12mm} \setlength\mathindent{0 cm} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{calc,intersections,matrix,arrows,pgfplots.polar} \usepgfplotslibrary{polar} \begin{document} \begin{tikzpicture} \begin{polaraxis}[width=300pt,xtick={0,30,...,330}, ytick={0,1,1.5}, major grid style={dotted}, minor grid style={dotted}, minor x tick num=1, minor y tick num=1, ] %\addplot [domain=0:5] (x,sin(2*x)); % (angle,radius) % \addplot coordinates {(180,2) (0,0)}; \addplot[data cs=cart,samples=20, domain=0:360, % the default choice ’variable=\x’ leads to % unexpected results here! variable=\t, quiver={ u={-sin((t))}, v={cos((t))}, scale arrows=0.5}, ->,blue] ({cos((t))}, {sin((t))}); \end{polaraxis} \end{tikzpicture} \\ \begin{tikzpicture} \begin{axis}[axis equal, axis lines=middle, axis line style={->}, tick style={color=black}, xtick=\empty, ytick=\empty ] \addplot[samples=20, domain=0:2*pi, % the default choice ’variable=\x’ leads to % unexpected results here! variable=\t, quiver={ u={-sin(deg(t))}, v={cos(deg(t))}, scale arrows=0.5}, ->,blue] ({cos(deg(t))}, {sin(deg(t))}); \addplot[samples=100, domain=0:2*pi] ({cos(deg(x))}, {sin(deg(x))}); \end{axis} \end{tikzpicture} \end{document}