> > I haven't ever needed to plot
Wh---whaaat?? ;) This is pretty straightforward: Note: you might need to checkout master or dev of Plots (I'm on dev)... I can't ever remember when I implemented anything. On Mon, May 9, 2016 at 10:24 AM, Scott Jones <scott.paul.jo...@gmail.com> wrote: > My son Alex is building on what he did last year for his science project, > where he used Julia to help do the calculations on the data he'd collected > (basically, he's lazy [in a good way], he'd rather work with his dad to > learn how to program something rather than do all all the basic arithmetic > to calculate things like the averages for his plots, and Julia made it > trivial). > This year, in math class, he's learned about calculating also the median, > mode(s), and the ranges, and he'd like to be able to plot the results > directly in Julia (last year, since I didn't know how, he ended up doing > the plotting by hand). > > He's written a program (with a little help from me) that inputs the data > from a CSV file (thanks, Jacob Quinn, for the CSV.jl package!) that he's > entered with Excel. > The data is simply a value, integer 0 - 7 (for the number of digits > remembered correctly after seeing a card with 7 digits for 30 seconds, and > reciting the alphabet). > > The program first makes of sorted vector of the unique ages in the data > set, and then creates a Vector of Vector of Int, each element having all of > the results for that age. > Then it uses that to create 4 vectors, mean_by_age, median_by_age, > low_range, and high_range. > > What we want to do, is to plot the ages on the X axis, with the results on > the Y axis, as a line segment from the low_range to the high_range (with > the top and bottom marked off with small horizontal lines), > and also have plotted mean_by_age, and median_by_age with different > colored lines with different markers (maybe diamonds and squares). > He might also want to display the mode(s) for each age (might be nice to > have those done as circles of different radius depending on how many > samples at that mode value) > > I haven't ever needed to plot, so I haven't been able to help him very > much, so far I'll I've been able to do is just call `plot(ages, > mean_by_age, linewidth=3)` and `plot(ages, median_by_age, linewidth= 3)` do > display two of the things he wants. > > Any help will be greatly appreciated! > > Thanks, > Scott (proud father of a beginning Julia ;-) ) > > >