Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Problems with absolute PlotRange

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104562] Problems with absolute PlotRange
  • From: Harrie Kraai <hakraai at xs4all.nl>
  • Date: Wed, 4 Nov 2009 01:33:03 -0500 (EST)

Hi, I met three problems with determining the absolute PlotRange for a 
Graphic

************************************************************************
PROBLEM 1: plotrange for point sets

-->
tab = Table[{RandomReal[0.5], RandomReal[{0.2, 0.4}]}, {10}];
lp = ListPlot[tab];
AbsoluteOptions[lp, PlotRange]
<--

output: {PlotRange -> {{0., 1.}, {0., 1.}}}, which is some sort of default

-->
lp2 = ListPlot[tab, Joined -> True];
AbsoluteOptions[lp2, PlotRange]
<--

out: {PlotRange -> {{0.0371531, 0.369901}, {0.204445, 0.362556}}}, which 
depends on random points of course, but is correct in my case

exactly the same thing happens using Graphics[Point[tab]] versus 
Graphics[Line[tab]]

Why doesn't Mathematica report the absolute plotrange? After all, it has 
determined one to be able to plot in the first place...

*************************************************************************

PROBLEM 2: explicite PlotRange, short notation (tab defined above)

-->
gr = Graphics[Line[tab], PlotRange -> 0.5]; (*Use explicit plotrange, 
shorthand notation*)
AbsoluteOptions[gr, PlotRange]
<--

produces an error message "PlotRange::prng", obviously it does not 
recognize the (new?) style of PlotRange setting, while the graphics plot ok.


************************************************************************

PROBLEM 3: after geometric transformation (tab defined above)

-->
gr2 = Graphics@
   GeometricTransformation[Line[tab], {{{1, 0}, {0, 1}}, {0, 0}}];
(* Essentially an identity transformation *)
AbsoluteOptions[gr2, PlotRange]
<--

output: {PlotRange -> {{0., 1.}, {0., 1.}}}, after 
GeometricTransformation the PlotRange is lost....


************************************************************************

Apparently the reported PlotRange for AbsoluteOptions has a number of 
problems, or am I missing a point here?

HK


  • Prev by Date: Re: Conventional way of doing "struct"-like things?
  • Next by Date: SelectionMove[] busted with InputField and DockedCells?
  • Previous by thread: Re: what's wrong with these expressions?
  • Next by thread: Re: Problems with absolute PlotRange