2

So, I just want to plot the area between two lines a color - the lines themselves should be invisible. It must be in ListPlot

l1 = Table[{n, n}, {n, 50}];
l2 = Table[{n, n - 10}, {n, 50}];
ListPlot[ {l1, l2}, Joined -> {True, True}, PlotRange -> All, 
 Filling -> {1 -> {{2}, {Lighter[LightBlue, 0.7]}}}]

That returns the area

enter image description here

But, I still need to remove the lines, lets try by making the thickness zero

ListPlot[ {l1, l2}, Joined -> {True, True}, 
 PlotStyle -> {Thickness[0], Thickness[0]}, PlotRange -> All, 
 Filling -> {1 -> {{2}, {Lighter[LightBlue, 0.7]}}}]

Nope, that doesn't work.

enter image description here

Lets try a negative thickness.

 ListPlot[ {l1, l2}, Joined -> {True, True}, 
 PlotStyle -> {Thickness[-2], Thickness[-2]}, PlotRange -> All, 
 Filling -> {1 -> {{2}, {Lighter[LightBlue, 0.7]}}}]

That works

enter image description here

Until you try to export it

graph = ListPlot[ {l1, l2}, Joined -> {True, True}, 
   PlotStyle -> {Thickness[-2], Thickness[-2]}, PlotRange -> All, 
   Filling -> {1 -> {{2}, {Lighter[LightBlue, 0.7]}}}];

Export["graphmew.jpeg", graph]

And our lines return.

enter image description here

Why do the lines return and how can I get rid of them.

David G. Stork
  • 41,180
  • 3
  • 34
  • 96
Tomi
  • 4,366
  • 16
  • 31
  • 2
    Try with Opacity – corey979 Mar 07 '17 at 23:38
  • 2
    A very similar question was posted recently: http://mathematica.stackexchange.com/q/139247/121 Incidentally I was not aware that Thickness[-2] would have the effect you show; I assumed it was invalid input. Nevertheless that question itself contains what should be a working solution for you. Please take a look and report if you have problems applying it. – Mr.Wizard Mar 07 '17 at 23:51
  • 3
    By the way I suggest you post Thickness[-2] as an answer to that linked question; it is certainly relevant there and you deserve credit for posting it. – Mr.Wizard Mar 07 '17 at 23:53

1 Answers1

1

Try this:

PlotStyle -> {None, None}
David G. Stork
  • 41,180
  • 3
  • 34
  • 96