MathGroup Archive 2001

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

Search the Archive

Re: Re: Creating graph with only a view data points

Oliver, try this

As you do not have a singled value function, you cannot use Plot. However,
ListPlot with the option PlotJoined -> True will join up your points. Note
the need to include PlotRange -> All otherwise extreme points will be cut
off. (I usually change the default option so that I see all my points.)

This may be good enough for your purposes. However, if you want smoother
curves you will have to use some interpolation. Split out the x and y
values and make interpolations for each set of points using the point
number as the dependent variable. 
Finally, use ParametricPlot to plot the curve as a function of point number. 

You can try using different amounts of smoothing by setting
InterpolationOrder to 1,2 3 etc but it is better to try to use more points
in the original data set. 

I hope the example below is clear (plots removed for simplicity).


data = {{0, 0}, {1, 0.5}, {2, 0.5}, {3, 0.5}, {2.1, 1.5}, {1, 5}}; 
p1 = ListPlot[data, PlotJoined -> True, PlotRange -> All]; 

(* if you wish to have smooth curves *)

xx = Interpolation[Transpose[data][[1]]]; 
yy = Interpolation[Transpose[data][[2]]]; 
p2 = ParametricPlot[{xx[r], yy[r]}, {r, 1, 6}, PlotRange -> All]; 
Show[p1, p2, PlotRange -> All]; 

At 01:13 18/05/01 -0400, you wrote:
>First of all thanks for your help.
>I'm sorry, but your solution don't work in my case.
>It could happen, that I have to go back on the x and y axis.
>For example:
>Mathematica isn't realy happy with that.
>Do you, or anybody else, have a solution for that?
>Greetings Oliver
>>(* Enter the data *)
>>data = {{-1, 0.1}, {-0.5, 0.15}, {-0.25, 0.5}, {0, 1}, {0.25, 2}, {0.5,
>>(* make a smooth function *)
>>ip = Interpolation[data]
>>(* plot the data *)
>>Plot[ip[u], {u, -1, 0.5}, PlotLegend -> {{"Some Function"}}]
>>Look very complicated!
>>  Jens
>>Oliver Tonn wrote:
>>> Hello,
>>> I'm a student at a school for technicians (electronic). I'm making my
>>> calculations with Mathematica.
>>> For a documentation I want to create a graph with the characteristic of
a diode
>>> and a transistor. I'm looking for a software, with which I only have to
>>> some significant points of the graph, the scale, and the legend. Then the
>>> software should create the graph.
>>> Does anybody know a software which could do that, or is it possible to
do this
>>> with Mathematica.
>>> Greetings Oliver

  • Prev by Date: Re: Re: Creating graph with only a few data points
  • Next by Date: 3d Graphics problem
  • Previous by thread: Re: Re: Creating graph with only a view data points
  • Next by thread: Re: Creating graph with only a view data points