I've just started reading an admittedly older book, Exploring Mathematics with Mathematica, by Theo Gray and Jerry Glynn, and I'm running into some issues with some sample code early in the text. I suspect this is just due to changes in syntax between versions of Mathematica. The book recommends a minimum of Version 2, and I'm on Version 10. I suspect some changes will be simple, and getting a few ideas from more advanced users who may be familiar with older versions might help me along.
Here's some sample code that I can't seem to run in Version 10:
test = Plot[Sin[x],{x,0,2 Pi},DisplayFunction->Identity];
Show[Graphics[{Thickness[0.001],Map[Line[{{#[[1]],0},#}]&,Nest[First,test,4]]}],Axes->Automatic]
I suspect the issue is with changes in the full form of the returned value of Plot?
Any hints or tips would be appreciated. I'd really like to understand the reason the original code no longer works, and as a bonus, some tips on recreating the effect intended (vertical lines extending from points in the plot to the X axis) using newer features and functions in Mathematica 10 would be great.
Thank you!
Christopher Fox