Re: Plot Labeling
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: Plot Labeling
- From: TODD GAYLEY <TGAYLEY at ccit.arizona.edu>
- Date: 29 Sep 1992 22:45:33 -0700 (MST)
Richard Christensen (Richard at remus.ee.byu.edu) asks: > I have asked everyone here who might kno an answer, but none of them do. I > hope you can help me. I have been having some problems with labeling plots > with the following plotting function. > > SamplesPlot[f_,fsamples_,num_,extent_] := > ListPlot[FFTsamplesdB[f],PlotStyle->Thickness[.00001],PlotJoined->True, > PlotRange->{{0,extent},{0,-100}}, > PlotLabel -> "f1 = 2000, fsampled = "fsamples" , num = "num \n\n"] > > Input[1]:=SamplesPlot[a,200000,10,100] > > This is what it give me > a fine plot and the title says > > 200000 f1 = 2000, fsampled = , num = > > I wnat it to say > > f1 = 2000, fsampled = 200000, num = 10 You need to make the PlotLabel into a single string with StringJoin. (I assume there is a typo in the version above, a missing " before the \n\n). PlotLabel->StringJoin["f1 = 2000, fsampled = ",ToString[fsamples], " , num = ",ToString[num],"\n\n" ] --Todd ----------------------------------------------------------------- Todd Gayley Department of Ecology and Evolutionary Biology University of Arizona tgayley at ccit.arizona.edu -or- tgayley at cs.arizona.edu