MathGroup Archive 1995

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

Search the Archive

Re: Plotting

  • To: mathgroup at
  • Subject: [mg2147] Re: Plotting
  • From: rmarimon at (Ricardo Marimon)
  • Date: Wed, 4 Oct 1995 01:58:55 -0400
  • Organization: Stanford University

In article <44qj7k$s22 at>, Julian Charko
<jcharko at> wrote:

> In order to plot the function f(x) = a^x, where a<0, over a 
> range of integer values of x, what plotting options would you
> need to use with the Plot command? 
> Specifying a plotting range of real numbers in the usual way,
> as shown below, for example, presents problems because
> Mathematica generates complex numbers for fractional exponents,
> and these obviously cannot be plotted by Plot.
>                  Plot[(-1)^x, {x, -5, 5}]

You would have to use ListPlot.  You can try writting

p = ListPlot[Table[{x, (-i)^x}, {x, -5, 0}], PlotJoined->True]
q = Plot[(-1)^x, {x, 0, 5}]
Show[p, q]

I haven't tried but it should work.

- Ricardo Marimon
  rmarimon at

  • Prev by Date: Re: [Q]How can I get the image of the graph...
  • Next by Date: Unreliable PostScript rendering
  • Previous by thread: Plotting
  • Next by thread: Re: Plotting