You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the plot functions work in combination with_pyfar.plot.context()_ (and matplotlib.style.context()) with styles as input:
import pyfar as pf
import matplotlib as mpl
import matplotlib.pyplot as plt
pf.plot.use()
with pf.plot.context('classic'):
fig, ax = plt.subplots(2, 1)
pf.plot.time(pf.TimeData([0, 1, 0, -1], range(4)), ax=ax[0])
ax[1].plot(range(4), [0, 1, 0, -1])
But not with dicts as arguments:
import pyfar as pf
import matplotlib as mpl
import matplotlib.pyplot as plt
pf.plot.use()
with pf.plot.context({'lines.linestyle': ':'}):
fig, ax = plt.subplots(2, 1)
pf.plot.time(pf.TimeData([0, 1, 0, -1], range(4)), ax=ax[0])
ax[1].plot(range(4), [0, 1, 0, -1])
I suppose the reason is that for example the linestyle is overwritten by the call of pyfar.plot.context() within the plot function. In constrast, this works well:
We discussed that there is not really a solution without calling the plot functions with a style=... parameter.
This includes the solution for avoiding all properties of the pyfar plot styles by calling with an empty dict style={}.
General
Description
It seems like the plot functions work in combination with_pyfar.plot.context()_ (and matplotlib.style.context()) with styles as input:
But not with dicts as arguments:
I suppose the reason is that for example the linestyle is overwritten by the call of pyfar.plot.context() within the plot function. In constrast, this works well:
The text was updated successfully, but these errors were encountered: