Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: A question concerning Show and PlotLegend

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65288] Re: [mg65255] A question concerning Show and PlotLegend
  • From: "Christopher Arthur" <pannoniara at aol.com>
  • Date: Fri, 24 Mar 2006 00:59:45 -0500 (EST)
  • References: <200603221113.GAA10204@smc.vnet.net> <000e01c64dce$4681ef00$4001a8c0@Aristophanes> <Pine.LNX.4.63.0603221322190.3371@ccc9.wpi.edu>
  • Sender: owner-wri-mathgroup at wolfram.com

I think this will do what you want:

Don't use the Show[] command.  Just use the Plot[] with your theoretical 
curves, but put in the option:

 Prolog->p2[[1]].

That should be the only reference to p2 in the statement.

 Then manually set the bounds with PlotRange->{{xmin,xmax},{ymin,ymax}}. 
You either have to enter specific numbers for the mins and maxs, or 
determine them by some function on your data set used to generate p2. 
Otherwise, the plot will display the region appropriate just for the 
theoretical curves.  But the Prolog statement should overlay the datapoints 
onto the theoretical curves.

Regards,

C.Arthur

----- Original Message ----- 
From: "Ryan Bradley Norman" <rbnorman at WPI.EDU>
To: mathgroup at smc.vnet.net
Subject: [mg65288] Re: [mg65255] A question concerning Show and PlotLegend


>
> What I was hoping was that the command PlotRange -> PlotRange[p2]] does is 
> set the PlotRange for the Show to that of p2- which is the plot of the 
> data points.  If you remove the variables for the legend, the plot does 
> what it is supposed to do- shows the theoretical curves and the data on 
> one plot.  Well, it actually outputs two plots.  One with just the curves 
> and below it one with the curves and the data plotted together.  But when 
> the variables used to set the legend are included it messes everything up.
>
> Just to be clear, p2 is a plot of some data points using MultipleListPlot 
> and I am trying to add two theoretical curves to the plot.
>
> Thanks,
> Ryan
>
> ***************************************
> Ryan Norman
> Physics Department
> Worcester Polytechnic Institute
> 100 Institute Rd
> Worcester, MA 01609
> (508) 831-6761
> ***************************************
>
> On Wed, 22 Mar 2006, Christopher Arthur wrote:
>
>> The PlotRange should just be a 2x2 array of {{xmin,xmax},{ymin, ymax}},
>> which tells Mathematica how much of the plot to draw.  I'm not sure what
>> you're trying to do with this.
>>
>>
>>
>> ----- Original Message ----- From: "Ryan Norman" <rbnorman at wpi.edu>
To: mathgroup at smc.vnet.net
>> Subject: [mg65288] [mg65255] A question concerning Show and PlotLegend
>>
>>
>>> Hello,
>>>
>>> I have searched the archive and have found some hints about PlotLegend
>>> being a slight pain to deal with and I am having some trouble myself.  I
>>> am trying to plot some theoretical curves along with some data.
>>>
>>> My code looks like:
>>>
>>> Show[Plot[{.389*10^3*dsigdtABC[x], .389*10^3*dsigdt[x]}, {x, xmin1,
>>> xmax1}, PlotStyle -> {{Dashing[{0}]}, {Dashing[{.05, .02}]}}, Axes ->
>>> False, Frame -> True, PlotLegend -> {"ABC", "OPE"}, LegendShadow -> 
>>> None,
>>> LegendSize -> {.35, .35}, LegendPosition -> {-.3, .05}, ImageSize -> 
>>> {450,
>>> 300}, PlotRange -> PlotRange[p2]], p2];
>>>
>>> Where p2 is a plot of the data points.  Right now it is spitting out the
>>> p2 plot below (and all jumbled) the plot of the curves. Can anyone offer
>>> some advice?
>>> Thanks,
>>> Ryan
>>>
>>>
>>
>>
>>
> 



  • Prev by Date: Re: Re: sorting list of roots af a transcendental function
  • Next by Date: Re: sorting list of roots af a transcendental function
  • Previous by thread: Re: Re: A question concerning Show and PlotLegend
  • Next by thread: Re: Re: A question concerning Show and PlotLegend