Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Re: question on Plot and Show plus Axis Labels:

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72592] Re: [mg72566] Re: question on Plot and Show plus Axis Labels:
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 10 Jan 2007 03:55:16 -0500 (EST)
  • Reply-to: hanlonr at cox.net

x=Range[15];

y1=Table[Cos[x*Pi/15],{x,15}];

y2=Table[Sin[x*Pi/15],{x,15}];

Plot[{Cos[t*Pi/15],Sin[t*Pi/15]},{t,0,15},
    Epilog->{AbsolutePointSize[4],
        Red,Point/@Thread[{x,y1}],
        Blue,Point/@Thread[{x,y2}]}];

Needs["Graphics`"];

MultipleListPlot[y1,y2,
    PlotJoined->True,SymbolStyle->{Red,Blue}];

DisplayTogether[
    ListPlot[y1,PlotJoined->True,
      PlotStyle->{Red}],
    ListPlot[y2,PlotJoined->True,
      PlotStyle->{Blue}]];


Bob Hanlon

---- Gopinath Venkatesan <gopinathv at ou.edu> wrote: 
> Hello David
> 
> Thanks for showing interest in my problem and for posting reply. Please see the below sample code. This sample is not related to my study, this is just to illustrate.
> 
> \!\(\(x = Table[i, {i, 1, 15, 1}];\)\[IndentingNewLine]
>   \(v = Table[Sin[\(Ã?â?¬\/15\) x[\([i]\)]], {i, 1, 15, 1}];\)\[IndentingNewLine]
>   \(y[j_] := Cos[Ã?â?¬\/15\ x[\([j]\)]];\)\[IndentingNewLine]
>   \(y1 = Table[y[j], {j, 1, 15, 1}];\)\[IndentingNewLine]
>   \(y2 = Table[v[\([j]\)], {j, 1, 15, 1}];\)\[IndentingNewLine]
>   p1 = ListPlot[Thread[y1, x], PlotJoined -> True]\[IndentingNewLine]
>   p2 = ListPlot[Thread[y2, x], PlotJoined -> True]\[IndentingNewLine]
>   Show[p1, p2]\) 
> 
> I could not use Plot for plotting a list of values of y1 and y2 for the x values. I tried using the below Plot command and got error,
> 
> p1=Plot[y1,{x,1,15}]
> 
> that y1 is not a machine readable value at x = 1.0000000+
> meaning that Plot tries to do a smooth fit between these intervals. In my case, x value increments by integer value, say unit increase. For that discrete sets of x values, I have respective y values and for using ListPlot, I have to thread these x and y values. Thats why I am using Thread.
> 
> If you can tell me how to use Plot function for plotting the values above, that will be great.
> 
> Or please suggest otherways where I have to use the combinations of ListPlot, Show, and others to produce a multi-plot with a axes label rotated (y axis), use Plot Legends to work with Show (or an alternate to Plot Legend since it doesnt work with Show), and coloring them differently. I figured out how to color them differently - using RBCColor option. But still got stuck with the Legends and the rotate labels options. 
> 
> RotateLabel works fine with Frames. If I use Frames, will that solve other problems too. I am trying, but just in case, if you know the answer, please hint me. Thanks,
> 
> Gopinath Venkatesan
> Graduate Student
> University of Oklahoma
> 


  • Prev by Date: Re: How to export txt files with variable name &
  • Next by Date: Re: help
  • Previous by thread: Re: question on Plot and Show plus Axis Labels:
  • Next by thread: Re: How can a dump file with 1.28MB have nothing in it?