tikzplotlib geht nicht beim Erstellen eines Polar-Plots

mit matplotlib, NumPy, pandas, SciPy, SymPy und weiteren mathematischen Programmbibliotheken.
Antworten
blablaKey
User
Beiträge: 1
Registriert: Dienstag 6. Dezember 2022, 08:08

Hallo zusammen,

ich habe Probleme beim Erstellen eines korrekt befüllten pgf-Files (tikz-Files) mit folgendem Minimalcode:

Code: Alles auswählen

import matplotlib.pyplot as plt
import numpy as np
import tikzplotlib

# Data for plotting
r1 = np.linspace(1, 1, num=36)
theta = np.linspace(0, 2*np.pi, num=36)

# Polar plot
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r1)
ax.set_rmin(0)
ax.set_rmax(2)
plt.show()

# save as pgf/tikz
tikzplotlib.save("figure.pgf")
Es wird zwar ein figure.pgf erstellt, allerdings hat dieses keinen Inhalt. Das Problem tritt immer dann auf, wenn ich einen Polar-Plot machen möchte.
Bei normalen x-y-Plots scheint es zu funktionieren.

Hat hier jemand eine Idee, wo das Problem liegen könnte?

Viele Grüße
blablaKey
Antworten