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
{{ message }}
Repository navigation
Using a linestyle cycler with plt.errorbar results in strange plots #7074
If the linestyles used in a plt.errorbar plot are adjusted manually, results are as expected. However, when using a linestyle cycler, the linestyles are simply ignored whereas using a ls cycler results in errorbar end points being connected by lines.
I believe this was fixed in subsequent versions of matplotlib v1.5.x
branch. Note that we are right now trying to get Continuum to push out a
v1.5.3 package through conda which was tagged last night. For some reason,
conda never picked up v1.5.2 (but I don't remember if that release
contained the needed fixes for this).
If the linestyles used in a plt.errorbar plot are adjusted manually,
results are as expected. However, when using a linestyle cycler, the
linestyles are simply ignored whereas using a ls cycler results in
errorbar end points being connected by lines.
Consider the following minimal example
import numpy as npimport matplotlib as mplimport matplotlib.pyplot as pltfrom cycler import cycler
x = np.arange(0.1, 4, 0.5)
y = np.exp(-x)
offsets = [0, 1]
linestyles = ['-', '--']
plt.figure()for offset, linestyle in zip(offsets, linestyles):
plt.errorbar(x, y + offset, xerr=0.1, yerr=0.3, ls=linestyle, color='b')
plt.title('manual plots')
plt.savefig('manual_plots.png')
The same set of figures is produced with 1.5.3. On the v2.x branch, both linestyle and ls cyclers produce the same results, though I'm not sure they're the expected results.
Hmm, I wonder if the plot() calls inside of errorbar() might be mishandling
some things...
The ls cycler image using 1.5.1 shows that the ls cycler is being used for
the plot()'s of the errorbar markers. This is obviously incorrect, and is
somehow fixed in v2.x. The next problem is how to get the main plot() call
to utilize the cycler if no linestyle is specified. I wonder if errorbar()
is passing in its own linestyle?
Activity
WeatherGod commentedon Sep 9, 2016
I believe this was fixed in subsequent versions of matplotlib v1.5.x
branch. Note that we are right now trying to get Continuum to push out a
v1.5.3 package through conda which was tagged last night. For some reason,
conda never picked up v1.5.2 (but I don't remember if that release
contained the needed fixes for this).
On Fri, Sep 9, 2016 at 9:44 AM, Christian Schou Oxvig <
notifications@github.com> wrote:
QuLogic commentedon Sep 9, 2016
The same set of figures is produced with 1.5.3. On the



v2.xbranch, bothlinestyleandlscyclers produce the same results, though I'm not sure they're the expected results.WeatherGod commentedon Sep 9, 2016
Hmm, I wonder if the plot() calls inside of errorbar() might be mishandling
some things...
The ls cycler image using 1.5.1 shows that the ls cycler is being used for
the plot()'s of the errorbar markers. This is obviously incorrect, and is
somehow fixed in v2.x. The next problem is how to get the main plot() call
to utilize the cycler if no linestyle is specified. I wonder if errorbar()
is passing in its own linestyle?
On Fri, Sep 9, 2016 at 4:19 PM, Elliott Sales de Andrade <
notifications@github.com> wrote:
tacaswell commentedon Sep 11, 2016
The guts of errorbar were almost completely re-written in #5593
Fix errorbar property cycling to match plot.
Fix errorbar property cycling to match plot.
Fix errorbar property cycling to match plot.
Fix errorbar property cycling to match plot.
Fix errorbar property cycling to match plot.
Fix errorbar property cycling to match plot.
Fix errorbar property cycling to match plot.