Re: Mathematical Modeling Problem II
- To: mathgroup at smc.vnet.net
- Subject: [mg59562] Re: [mg59523] Mathematical Modeling Problem II
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 12 Aug 2005 00:09:06 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Peter, Why not just use Line[{{x,y1},{x,y2}}]? You have not given us enough information about what else you wish to include in your plot. If you had a list of data points you could use... Show[Graphics[ {Point /@ datapoints, Line[{{x,y1},{x,y2}}]}], PlotLabel -> "My data points", ImageSize -> 450] If you are trying to combine this with a curve, you could put the points and Line in an Epilog or Prolog option. Plot[Sin[x],{x,0,2Pi}, Epilog -> {Point /@ datapoints,Line[{{x,y1},{x,y2}}]}, PlotLabel -> "My data points", ImageSize -> 450] Assuming that it's not just that you were unaware of the Line primitive, this might be another case where the normal Mathematica graphics paradigm is confusing to users, especially new users. Why can't one just draw one thing after another as one would do on a piece of paper? With the DrawGraphics package from my web site, that's exactly what you can do. The above statement would be... Draw2D[ {Draw[Sin[x],{x,0,2Pi}], (* draw a curve *) Point /@ datapoints, (* add the data points *) Line[{{x,y1},{x,y2}}] (* draw the line *)}, PlotLabel -> "My data points", ImageSize -> 450] and you could add other types of curves produced by other plot routines such as ParametricDraw or ImplicitDraw or graphics directives such as colors or Thickness. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Sycamor at gmail.com [mailto:Sycamor at gmail.com] To: mathgroup at smc.vnet.net Hello. I am a high school student working on a summer research project at a local university. My task is to model a certain physical situations using Mathematica. I am still ignorant of the programs profound, and not-so-profound secrets. At the moment, I find myself unable to plot a vertical line. How does one create a vertical line and show that line on the same axes as a set of data points? Ideally, I would also like to keep the vertical scale the same. In my quest for a vertical line, I have tried using very steep curves, and using the ImplicitPlot package. I expect I am missing something very obvious. Thank you very much, Peter Hedman