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

MathGroup Archive 2008

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

Search the Archive

Re: Problem/bug with ends of thick lines in graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88476] Re: Problem/bug with ends of thick lines in graphics
  • From: ragfield <ragfield at gmail.com>
  • Date: Tue, 6 May 2008 06:41:26 -0400 (EDT)
  • References: <fvhe27$3t8$1@smc.vnet.net>

On May 3, 5:16 am, David Reiss <dbre... at gmail.com> wrote:
> Consider the following graph:
>
> Plot[x, {x, 1/3, 3/4}, PlotRange -> {{0, 1}, {0, 1}},
>  PlotStyle -> {AbsoluteThickness[20]}]
>
> When you plot it you will see that the line's ends are not
> rectangular, whereas you would certainly want them to be so.

=2E..

> Does anyone have any solutions to either or both of these issues?

There are a couple of things you can do to alter the appearance of
this graphic.  In this specific case adding PlotPoints->3 to the Plot
command is enough to do the trick.  Another option is to manually
remove a few (4-5) points from both the start and end of the Line
primitive in the resulting graphic.  This problem occurs when the
points at the beginning/end of the line are so very close together
that the OS graphics library gets a little confused about what angle
to draw the line cap, and it's really only noticeable when the line is
thick enough that the cap is clearly visible.

-Rob


  • Prev by Date: Re: Problem/bug with ends of thick lines in graphics
  • Next by Date: Re: Fitting with a power embedded in a integration
  • Previous by thread: Re: Problem/bug with ends of thick lines in graphics
  • Next by thread: Re: Problem/bug with ends of thick lines in graphics