Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newspump.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail From: Joe Gwinn Newsgroups: comp.soft-sys.math.mathematica Subject: Re: Plotting Data By State Date: Sat, 3 May 2014 07:41:14 +0000 (UTC) Sender: steve@smc.vnet.net Approved: Steven M. Christensen , Moderator Message-ID: References: Lines: 52 Organization: Time-Warner Telecom NNTP-Posting-Date: 03 May 2014 07:47:28 GMT NNTP-Posting-Host: 34e5c530.news.twtelecom.net X-Trace: DXC=5XTl[dHb:L4BnH\hm8kQj6=;[h;PUXBgb43`G[5H2>>M2EFiONJ7[Go6CQX:5iZ?hh6 X-Complaints-To: abuse@twtelecom.net X-Received-Bytes: 2178 X-Received-Body-CRC: 553513546 Xref: csiph.com comp.soft-sys.math.mathematica:16897 In article , Alexandra Lipson 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; [snip] > > crimeData = > Import["http://hci.stanford.edu/jheer/workshop/data/crime/CrimeStatebyState.csv"] [snip] > 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