MathGroup Archive 2014

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

Search the Archive

Re: Plotting Data By State

  • To: mathgroup at
  • Subject: [mg132676] Re: Plotting Data By State
  • From: Joe Gwinn <joegwinn at>
  • Date: Sat, 3 May 2014 03:40:55 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <ljvdb7$ba0$>

In article <ljvdb7$ba0$1 at>, Alexandra Lipson
<lipson.alexandra at> wrote:

> Hello All,
> I am trying to plot manipulated crime data from 1973 on a United States map
> to show the comparisons of the number of arrests of certain crimes to the
> number of actual crimes committed in a specific year. I want to show
> whether there are more arrests than crimes or more crimes than arrests in
> each state.
> I am new to Mathematica and would love some help. Here is what I have so
> far...(data manipulation still in progress):
> data = Import["/Users/allielipson/Desktop/USArrests.csv"];
> alPop = 4000000;
> akPop = 300000;
> crimeData =
>  Import["";]

The general pattern is as follows:

ListPlot[ Transpose[{listA, listB}] ]

The lists must have the same length, or Transpose will bark at you.

ListPlot[ Transpose[{listA, listB}], Joined->True] will draw lines
between the points.

ListPlot[ {Transpose[{listA, listB}], Transpose[{listC, listD}]} ] will
co-plot the two curves.

And so on.

One can also do the Transposes in advance:

listAB = Transpose[{listA, listB}];

listCD = Transpose[{listC, listD}];

The trailing semicolons prevent the whole matrix from being printed out
at length.

ListPlot[{listAB, listCD}, Joined->True]

Joe Gwinn

  • Prev by Date: Re: How to avoid repeated recalculation of the same function
  • Next by Date: Re: How to avoid repeated recalculation of the same function
  • Previous by thread: Re: Plotting Data By State
  • Next by thread: Re: Copying Text From CDFs