MathGroup Archive 2008

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

Search the Archive

Re: PointSize (and shape) frustration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85919] Re: PointSize (and shape) frustration
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 27 Feb 2008 04:35:31 -0500 (EST)
  • References: <fq0uke$kdp$1@smc.vnet.net>

This is a case where you want to show a 'global' view and a 'detailed' view
at the same time. Nice if you can do it, but it depends on the details of
screen resolution, or print resolution or the acuity of viewer's eyes.

I know that this is not totally responsive to your question, but a standard
solution to this kind of problem is to use multiple images, a global view
and perhaps several local views in higher detail.

lm[r_]:=NestList[r # (1-#)&,.5,50000]
bif=Join@@Table[{r,#}&/@Union[Take[lm[r],-100],SameTest->(Abs[#1-#2]<1*^-3&)],{r,2.0,3.98,.001}];

ListPlot[bif, PlotRange -> All, PlotStyle -> AbsolutePointSize[.05]]

With[{xmin = 3.4, xmax = 3.7, ymin = .3, ymax = .4},
 bif2 = Cases[
   bif, {x_, y_} /; xmin <= x <= xmax \[And] ymin <= y <= ymax];
 Length[bif2]]

ListPlot[bif2, PlotRange -> All, PlotStyle -> AbsolutePointSize[2],
 ImageSize -> 600]

Again, I know that you are looking for printed output, but this is just the
type of situation where Mathematica notebooks are so much superior with
their dynamic capabilities. The following is a Manipulate definition that
allows both global and detailed views.

Manipulate[
 Graphics[{AbsolutePointSize[2], Point[bif]},
  AspectRatio -> 1,
  PlotRange -> {{xcenter - xwidth/2,
     xcenter + xwidth/2}, {ycenter - ywidth/2, ycenter + ywidth/2}},
  Frame -> True,
  ImageSize -> {400, 400}],
 Style["Logistics Map Explorer", 20],
 Delimiter,
 {xcenter, 3.1, InputField},
 {xwidth, 4, InputField},
 Delimiter,
 {ycenter, .6, InputField},
 {ywidth, 1.5, InputField}
 ]


--
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Szabolcs Horv=E1t" <szhorvat at gmail.com> wrote in message
news:fq0uke$kdp$1 at smc.vnet.net...
> While Mathematica 6 can display beautiful graphics on screen compared to
> previous versions, graphics export became extremely frustrating and buggy.
>
> I complained about several issues before, now here's one more:
>
> I am trying to plot the bifurcation diagram for the logistic map, point
> by point.  The point size needs to be tuned precisely to get a nice plot
> (for print).  Mathematica refuses to export *circular* points to PDF/EPS
> below a certain size, but in this case I can live with that.  However,
> Mathematica refuses to draw points below a certain size, no matter what
> the value of PointSize or AbsolutePointSize is!!  If the points overlap,
> the plot is completely ruined.
>
> Then I tried using Disk[]s instead of points.  On screen it looks fine,
> but when exported to PDF, Mathematica does something very strange, and
> the result doesn't even have the disks any more!  Instead there are some
> little crosses on a *regular* grid, approximating the shape of the plot.
>
> I *know* that 30000 points can inflate the file size, and I know that
> arbitrarily small points are not printable/displayable, but I can solve
> these problems on my own.  I don't want Mathematica to try to be smart
> and make its own decisions about this, because it will just cause trouble.
>
> Here's the code to experiment with (I know that it doesn't produce a
> precise result):
>
> lm[r_] := NestList[r # (1 - #) &, .5, 50000]
>
> bif = Join @@ Table[
>     {r, #} & /@
>      Union[Take[lm[r], -100], SameTest -> (Abs[#1 - #2] < 1*^-3 &)],
>     {r, 2.0, 3.98, .001}
>     ];
>
> plot = ListPlot[bif, PlotRange -> All, PlotStyle ->
> AbsolutePointSize[.05]]
>
> plot = Graphics[{PointSize[.0001], Point[bif]}]
>
> plot = Graphics[Disk[#, 1/1000] & /@ bif]
>
> Now try exporting each of these plots at reasonable sizes (i.e. not hal=
f
> a metre).  Remember that exporting PDFs at different sizes only works a=
s
> Export["plot.pdf", Show[plot, ImageSize -> someValue]] because Export i=
s
> buggy and does not respect the ImageSize options for PDFs!
>



  • Prev by Date: Re: about scoping in modules
  • Next by Date: Re: Localizing Large Numbers of Variables in a DynamicModule:
  • Previous by thread: Re: PointSize (and shape) frustration
  • Next by thread: Text does not scale with size of graphic