1
$\begingroup$

I am trying to make a ListPlot with errorbars by using Filling. However, is some cases, some of the errorbars are missing. Why? Here is an example:

test = 
  {{{12.5, 2.3458330528920013}, {8., 2.026674892670841}, {13.9, 2.414291671785107}, 
    {11.9, 2.914023786219254}, {11.5, 2.722805195984148}, {7.9, 2.0961107498634486}}, 
   {{12.5, 2.1850350078313467}, {8., 1.9120983867236054}, {13.9, 2.242970208104576}, 
    {11.9, 2.724036258443863}, {11.5, 2.6537600418574083}, {7.9, 2.020026681009219}}, 
   {{12.5, 2.265434030361674}, {8., 1.9693866396972233}, {13.9, 2.3286309399448415}, 
    {11.9, 2.8190300223315585}, {11.5, 2.6882826189207782}, {7.9, 2.0580687154363337}}};

ListPlot[test, PlotRange -> {{5, 15}, All}, PlotMarkers -> {"up", "down", "center"}, 
  Filling -> {2 -> {{1}, Directive[Black, AbsoluteThickness[3]]}}]

enter image description here

Your help is appreciated. thanks, L

$\endgroup$
1
$\begingroup$

For some reason it works if you sort the sublists to be in increasing order,

ListPlot[Sort /@ test, PlotRange -> {{5, 15}, All}, 
 PlotMarkers -> {"up", "down", "center"}, 
 Filling -> {2 -> {{1}, Directive[Black, AbsoluteThickness[3]]}}]

enter image description here

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.