RE: Troubleshooting Mathematic's Help
- To: mathgroup at smc.vnet.net
- Subject: [mg72489] RE: [mg72473] Troubleshooting Mathematic's Help
- From: "David Park" <djmp at earthlink.net>
- Date: Mon, 1 Jan 2007 04:11:08 -0500 (EST)
Steven, That must be a very old book indeed! There are two problem. 1) the usage of Arrow has changed and 2) you do have to work at the Graphics level. The solution for the first problem is to use the Help notebook for the standard package Arrow. The plot could be written X = {3, 4}; Show[ Graphics[ {Blue, Arrow[{0, 0}, {0, 0} + X]}], Axes -> True, PlotRange -> All, AxesLabel -> {"x", "y"}, AxesOrigin -> {0, 0}]; The question illustrates the problem with Mathematica graphics, which is a mixture of 'set-piece' plots and graphics primitives. To combine various graphical elements one has to keep switching beween graphical levels and know what things go at which levels. The experts may learn how to get good at this, but it is still a barrier to many users and even a psychological barrier to advanced users. It is much better to keep everything at the level of graphics primitives and graphics directives and just combine the elements one wants one after the other. That's what DrawGraphics does. Here is the same graphic with DrawGraphics with the arrow connecting two points on a Sin curve. Needs["DrawGraphics`DrawingMaster`"] Draw2D[ {Blue, Arrow[{0, 0}, {0, 0} + X], Black, Draw[4 Sin[x Pi/6], {x, 0, 3}]}, Axes -> True, PlotRange -> All, AxesLabel -> {"x", "y"}]; You can also do this using DisplayTogether by switching levels. Needs["Graphics`Graphics`"] DisplayTogether[ Graphics[{Blue, Arrow[{0, 0}, {0, 0} + X], Black}], Plot[4Sin[x Pi/6], {x, 0, 3}], Axes -> True, PlotRange -> All, AxesLabel -> {"x", "y"}]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Steven Shippee [mailto:slshippee at comcast.net] In an old, old book by Bill Davis, Horacio Porta, & Jerry Uhl I saw an example of how to draw a vector, e.g., << Graphics`Arrow` X = {3, 4}; Show[Arrow[X, Tail -> {0, 0}, Blue], Axes -> True, PlotRange -> All, AxesLabel -> {"x", "y"}, AxesOrigin -> {0, 0}]; Not being that familiar with Mathematica, where would be the best place to start to debug this? Error message indicates it could be a problem with Tail and/or with Arrow, looking at master index Arrow looks OK, unless it needs to be embedded within the Graphics command? Thanks in advance, Steven Shippee slshippee at comcast.net