Group Abstract Group Abstract

Message Boards Message Boards

2
|
4.4K Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Updating example from "Exploring Mathematics with Mathematica"?

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. Sample image Thank you!

Christopher Fox

POSTED BY: Christopher Fox
2 Replies

Thank you for the prompt and detailed reply, and thanks so much for the extra information on how to recreate the example using newer features!

Christopher

POSTED BY: Christopher Fox
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard