Tweeted twitter.com/#!/StackMma/status/549354188271271936
3 deleted 77 characters in body
source | link

I am using the following to do this, which, even though it works for all four years, results in an error message:

I am using the following to do this, which, even though it works for all four years, results in an error message:

I am using the following to do this:

2 deleted 127 characters in body
source | link
Manipulate[
 Show[ListPlot[DataPoints[[year]]], 
  PlotRange -> {{0, 100}, {0, 100}}, AxesOrigin -> {0, 0}, 
  AxesLabel -> {"X", "Y"}], {{year,1}, {1 ->  2002"2002", 2 -> 2003"2003", 3 -> 2004"2004", 
   4 -> 2005"2005"}}]

First: I can't figure out what is generating the error, because when I omit the 'u' labels it works fine. FYI, I have tried to use quotes around the years and it does not work.

Second: Is there a way to label each datapoint on the scatterplot with a Manipulate function? I can get it to work for one year only...

Thanks, Arebearit

Note: Edited because first problem was solved.

Manipulate[
 Show[ListPlot[DataPoints[[year]]], 
  PlotRange -> {{0, 100}, {0, 100}}, AxesOrigin -> {0, 0}, 
  AxesLabel -> {"X", "Y"}], {year, {1 ->  2002, 2 -> 2003, 3 -> 2004, 
   4 -> 2005}}]

First: I can't figure out what is generating the error, because when I omit the 'u' labels it works fine. FYI, I have tried to use quotes around the years and it does not work.

Second: Is there a way to label each datapoint on the scatterplot with a Manipulate function? I can get it to work for one year only...

Thanks, Arebearit

Manipulate[
 Show[ListPlot[DataPoints[[year]]], 
  PlotRange -> {{0, 100}, {0, 100}}, AxesOrigin -> {0, 0}, 
  AxesLabel -> {"X", "Y"}], {{year,1}, {1 ->  "2002", 2 -> "2003", 3 -> "2004", 
   4 -> "2005"}}]

Is there a way to label each datapoint on the scatterplot with a Manipulate function? I can get it to work for one year only...

Thanks, Arebearit

Note: Edited because first problem was solved.

1
source | link

Manipulate: ListPlot and Labeling

I am trying to make a set of scatterplots where the 'u' value is a year. I am using the following dataset:

DataPoints = {{{39, 34}, {58, 72}, {55, 71}, {61, 42}, {56, 60}, {23, 
    83}, {57, 70}, {54, 72}, {23, 80}, {20, 36}, {28, 64}, {25, 
    21}, {24, 90}, {57, 79}, {22, 65}, {53, 52}, {19, 74}, {63, 
    48}}, {{66, 59}, {62, 63}, {66, 37}, {65, 25}, {87, 78}, {61, 
    34}, {17, 27}, {55, 46}, {61, 38}, {70, 70}}, {{59, 43}, {55, 
    45}, {18, 16}, {29, 37}, {43, 30}, {62, 58}}, {{48, 59}, {14, 
    42}, {61, 39}, {55, 38}, {13, 38}, {17, 42}, {15, 27}, {58, 
    62}, {30, 46}, {54, 41}, {44, 23}, {53, 55}}}
Countries = {{"ARG", "CAN", "CZE", "FRA", "GER", "GHA", "ITA", "JPN", 
   "KEN", "LBN", "MEX", "PAK", "PHL", "POL", "ZAF", "KOR", "UGA", 
   "GBR"}, {"AUS", "CAN", "FRA", "GER", "ISR", "ITA", "LBN", "KOR", 
   "ESP", "GBR"}, {"FRA", "GER", "PAK", "RUS", "TUR", "GBR"}, {"CAN", 
   "CHN", "FRA", "GER", "IDN", "LBN", "PAK", "POL", "RUS", "ESP", 
   "TUR", "GBR"}}

I am using the following to do this, which, even though it works for all four years, results in an error message:

Manipulate[
 Show[ListPlot[DataPoints[[year]]], 
  PlotRange -> {{0, 100}, {0, 100}}, AxesOrigin -> {0, 0}, 
  AxesLabel -> {"X", "Y"}], {year, {1 ->  2002, 2 -> 2003, 3 -> 2004, 
   4 -> 2005}}]

First: I can't figure out what is generating the error, because when I omit the 'u' labels it works fine. FYI, I have tried to use quotes around the years and it does not work.

Second: Is there a way to label each datapoint on the scatterplot with a Manipulate function? I can get it to work for one year only...

Thanks, Arebearit