I am working on more flexible version of ErrorListPlot from the ErrorBarPlotspackage.

The basic idea is that I ListPlot three lists of points; the data itself and then two more lists which contain the upper and lower bounds of the error bar. I then use Filling to create the error bar between them.

Here is an example:

someData = {{{-(222/125), 6143/1000}, {67/25, 5287/1000}, {617/200, 3759/500}}, {{-(222/125), 2803/500}, {67/25, 598/125}, {617/200, 3397/500}}, {{-(222/125), 2937/500}, {67/25, 1259/250}, {617/200, 1789/250}}};
 Filling -> {2 -> {1}},
 Axes -> False, 
 Frame -> True

The result is

enter image description here

but if I plot the three lists with the points in a different order (in this case just reversed) then the filling doesn't work:

 Filling -> {2 -> {1}},
 Axes -> False, 
 Frame -> True

List plot where filling doesn't work

Can anyone explain what is going on here? Is this a bug?

The best I have come up with at the moment is to just keep plotting my data in different orders until it works...

  • 1
    $\begingroup$ I see the same strange behavior using Mathematica 8.0.4 on Windows x64. $\endgroup$ – innaiz Feb 28 '18 at 12:02
  • $\begingroup$ It seems that Filling works on ordered datapoints... $\endgroup$ – José Antonio Díaz Navas Mar 1 '18 at 12:41
  • $\begingroup$ @JoséAntonioDíazNavas yes that seems to be true on the various trials I have attempted. Interesting $\endgroup$ – lac Mar 4 '18 at 15:59
  • $\begingroup$ Have you reported this as a bug to Wolfram Support? $\endgroup$ – rhermans May 30 '18 at 16:35
  • $\begingroup$ related/possible duplicate: Filling option failing when ListLinePlot given my data $\endgroup$ – kglr May 30 '18 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.