MathGroup Archive 1999

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

Search the Archive

Re: plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18303] Re: plot
  • From: "Atul Sharma" <mdsa at musica.mcgill.ca>
  • Date: Fri, 25 Jun 1999 22:24:12 -0400
  • References: <7ktt58$939@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

You may want to read up on Graphics primitives in "the book", particulary
Line[ ] and Graphics[ ]. Try the following (which could be prettied up with
colors and the like):


data={ 1, 2, 3, 4, 4};


orderedPairs=Table[{i,data[[i]]},{i,1,Length[data]}];
lines=Table[
    Graphics[Line[{{i,0},{i,orderedPairs[[i,2]]}}]],{i,1,Length[data]}];

p1=ListPlot[data,DisplayFunction->Identity];

Show[p1,lines,DisplayFunction->$DisplayFunction];

A. Sharma

ywang at hmsi.com wrote in message <7ktt58$939 at smc.vnet.net>...
>If I have a list such as { 1, 2, 3, 4, 4}, I want to plot the list that
>a verticle line will be draw from the x axis to end at the value. How
>to do it?
>
>
>Thank you!
>
>Frank Wang
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
>




  • Prev by Date: Elastodynamic tensor calculus on Mathematica
  • Next by Date: Re: Graphic simple?
  • Previous by thread: Re: plot
  • Next by thread: Comparison of Mathematica on Various Computers