Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Show problem: combining ListPlot and Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97018] Re: Show problem: combining ListPlot and Plot
  • From: carlos at colorado.edu
  • Date: Mon, 2 Mar 2009 05:22:12 -0500 (EST)
  • References: <200902271113.GAA21534@smc.vnet.net> <gob7t5$g6m$1@smc.vnet.net>

On Feb 28, 4:41 am, Curtis Osterhoudt <c... at lanl.gov> wrote:
> Works for me (under v. 7); replace "PlotJoined" with "Joined". Also, to r=
emove the "squishedness" of the plot, use, in the outer Show, the "AspectRa=
tio -> 1/GoldenRatio" option.
>
>                  C.O.
>
> On Friday 27 February 2009 04:13:59 am car... at colorado.edu wrote:
>
>
>
> > The following extract exemplifies a plot technique I used to
> > combine ListPlot and a Plot under v 2.2. It worked fine
> > under 3.0, 4.1,4.2 and 5.1.  But students using this under 6.0 and
> > 7.0 for a HW report the plot frame "squished", and that line colors
> > disagree with the title. Question: can this be fixed in
> > a simple way or should it be completely rewritten? Thanks.
>
> >    DisplayChannel=$DisplayFunction;
> >    If [$VersionNumber>=6.0, DisplayChannel=Print];
> >   (* fix for Mathematica 6 & later *)
> >    Off[General::spell1]; Off[General::spell];
>
> >    ClearAll[r];
> >    vFEM={{4., 0.054}, {7., 0.0395}, {10., 0.037}};
> >    vexact=0.1905*(1/r + r/100); rbeg=4.; rend=10.;
> >    pFEM=ListPlot[vFEM,PlotJoined->True,PlotStyle->{RGBColor[1,0,0=
]},
> >         DisplayFunction->Identity];
> >    pexact=Plot[vexact,{r,rbeg,rend},PlotStyle->{RGBColor[0,0,0]},
> >         DisplayFunction->Identity];
> >    Show[Graphics[AbsoluteThickness[2]],pexact,
> >         pFEM,TextStyle->{FontFamily->"Times",FontSize->12},
> >         GridLines->Automatic,Axes->True,PlotRange->All,
> >         PlotLabel->"Radial displacement (black=exact,red=FE=
M)",
> >         Frame->True, DisplayFunction->DisplayChannel];
>
> --
> =========================
==========================
=========
> Curtis Osterhoudt
> cfo at remove_this.lanl.and_this.gov
> PGP Key ID: 0x4DCA2A10
> Please avoid sending me Word or PowerPoint attachments
> Seehttp://www.gnu.org/philosophy/no-word-attachments.html
> =========================
==========================
=========

So under $VersionNumber>=6.0 the default AspectRatio has changed and
Joined has replaced PlotJoined?


  • Prev by Date: Re: Delayed function does not behave as original input
  • Next by Date: Re: Delayed function does not behave as original input
  • Previous by thread: mesh in RegionPlot
  • Next by thread: Convolution of a Gaussian Distribution and a discontinuous function