MathGroup Archive 2009

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

Search the Archive

Re: Plot: Problem with Mesh Option

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102692] Re: [mg102661] Plot: Problem with Mesh Option
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 19 Aug 2009 07:02:01 -0400 (EDT)
  • References: <200908181006.GAA17464@smc.vnet.net>
  • Reply-to: drmajorbob at bigfoot.com

Since "mesh" is undefined, it's hard to be sure... but it appears (from  
this example at least) that a mesh lives in the INTERIOR of the plotted  
curve or surface.

Hence, for instance:

timevector = Table[0.1*i, {i, 0, 10}];
epsilon = .0000001;
Plot[Sin[t], {t, First[timevector] - epsilon,
   Last[timevector] + epsilon}, Mesh -> {timevector},
  MeshStyle -> Directive[PointSize[Large], Red]]

shows all 11 mesh points.

Bobby

On Tue, 18 Aug 2009 05:06:45 -0500, Benjamin Hell <hell at exoneon.de> wrote:

> Hi,
> I'm currently stuck on figuring out how to display the full mesh when
> manually defining it via passing a list of points, which looks like this:
>
> timevector = Table[0.1*i, {i, 0, 10}];
> Plot[Sin[t], {t, First[timevector], Last[timevector]},
> Mesh -> {timevector}, MeshStyle -> Directive[PointSize[Large], Red]]
>
> The whole thing works as expected, but the first and the last point of
> the mesh, which correspond to {0,Sin[0]} and {1,Sin[1]} in the example
> above, don't show up. So how can I fix that?
>
>
>
> Here is my further investigation:
> - The points of course do show up if I increase the time interval on
> both sides, let's say {t, First[timevector]-0.1, Last[timevector]+0.1}
> but this is not a proper solution to me.
>
> - Workarounds that do work:
>       1.Manually inserting the points in the Graphics output via a
>       new Graphics object (not that nice):
>       Show[
>         Plot[Sin[t], {t, First[timevector], Last[timevector]},
>        Mesh -> {timevector}, MeshStyle -> Directive[PointSize[Large],
>        Red]],
>         Graphics[{PointSize[Large], Red,
>           Point[{First[timevector], Sin[First[timevector]]}],
>           Point[{Last[timevector], Sin[Last[timevector]]}]}]
>        ]
>
>       2.Using ParametricPlot instead of Plot (the best solution I
>       found):
>       ParametricPlot[{t, Sin[t]}, {t, First[timevector],
>        Last[timevector]},
>        Mesh -> {timevector}, MeshStyle -> Directive[PointSize[Large],
>       Red]]
>
> Thanks in advance,
> Benjamin
>



-- 
DrMajorBob at bigfoot.com


  • Prev by Date: Re: Plot: Problem with Mesh Option
  • Next by Date: Re: Plot: Problem with Mesh Option
  • Previous by thread: Plot: Problem with Mesh Option
  • Next by thread: Re: Plot: Problem with Mesh Option