MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

plot legend with filling

  • To: mathgroup at
  • Subject: [mg126958] plot legend with filling
  • From: Francisco Gutierrez <fgutiers2002 at>
  • Date: Wed, 20 Jun 2012 03:50:59 -0400 (EDT)
  • Delivered-to:
  • Reply-to: Francisco Gutierrez <fgutiers2002 at>

Dear group:
I have two arrays of numbers, think of something like this: 

I want to make a graph with these two arrays, where I get:
a. A line from the x axis to each point in each array
b. A legend, with say v1 red and v2  blue
c. Each array has its own filling style (different color, thickness, etc.).

The problem is that I can find ways of plugging in two of these characteristics, but not all three. For example: 
p1=ListPlot[v1,  Filling->Axis, FillingStyle->Directive[AbsoluteThickness[4], Blue]]
p2=p2=ListPlot[v2,  Filling->Axis, FillingStyle->Directive[AbsoluteThickness[4], Red]]
Show[p1,p2], but then I did not manage to find the way of using Show and PlotLegend at the same time.

Or I can put both arrays into a Listplot command, but then I did not find how to attribute a different color AND thickness to the filling of each array.
I'm using Mathematica 8
Can somebody help me?


  • Prev by Date: NDSolve profiling
  • Next by Date: altering each member of a list that matches a certain pattern
  • Previous by thread: Re: NDSolve profiling
  • Next by thread: Re: plot legend with filling