MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plotting 2d graphs?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57196] Re: Plotting 2d graphs?
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Fri, 20 May 2005 04:43:41 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 5/19/05 at 3:09 AM, psidoc at gmail.com (Paul Hughes) wrote:

>I'm having trouble using the basic 2d plot function.  I want to be
>able to plot things such as a simple quadratic or ellipse:

>Examples:  2x^2 + 16x + 32 = 0  (Quadratic)

>(x-5)^2/16 + (y+4)^2/25 = 1  (Ellipse)

>But have failed to do so, having tried every variation i can think
>of to get it to work.

For your first example, try

Plot[2*x^2 + 16*x + 32, {x, -10, 2}]; 

Here, the arguements to plot are the function (2*x^2 + 16*x + 32) to be plotted and a list giving the independent variable and the range to sample it.

For your second example, try

<<Graphics`
ImplicitPlot[(x - 5)^2/16 + (y + 4)^2/25 == 1, 
   {x, 0, 10}, {y, -10, 4}, AspectRatio -> 1]; 
   

Here the arguments are the equation, (x - 5)^2/16 + (y + 4)^2/25 == 1 (note the usage of "==" instead of "=") and two list giving the variables and ranges for sampling each variable. I also changed the default aspect ratio so the resulting plot would be a truer representation of this ellipse.
--
To reply via email subtract one hundred and four


  • Prev by Date: four approaches to do a simple sum
  • Next by Date: Re: Errors from FindFit
  • Previous by thread: Re: Plotting 2d graphs?
  • Next by thread: four dimensioal polynomial composition