MathGroup Archive 2005

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

Search the Archive

Re: finding out what Automatic was

  • To: mathgroup at
  • Subject: [mg54242] Re: finding out what Automatic was
  • From: Chris Chiasson <chris.chiasson at>
  • Date: Mon, 14 Feb 2005 21:50:35 -0500 (EST)
  • References: <>
  • Reply-to: Chris Chiasson <chris.chiasson at>
  • Sender: owner-wri-mathgroup at

Your question seems like a good one to me, probably because I don't
know the answer :]

However, given that the category intervalas by the histogram command
are in the form of rectangles, one could just extract them. The first
three lines of the code that follow are directly from the help file
entry that contains the Histogram function description. Please accept
my apologies if you already understand the concepts involved in this
code. This code may be evaluated one line at a time for clarity.





(*hist is a graphics object - the next line shows the internal
structure of hist*)


(*notice everything fis the form h[argument1,argument2,etc], which can
be thought of as functions*)




(*notice the similarity between lists and everyday functions that have
not evaluated their parameters*)

(*There are commands for extracting objects at different "depths" of
nested functions.*)

(*the relevant objects we would like to extract are the rectangle
functions, which are located on level 4 of the hist graphics object*)


(*note how the 4 is inisde brackets, just passing a plain 4 will give
everything down to that level, not just the level itself*)

(*how many levels of nested functions are there in this graphics object*)



(*most commands have a parameter allowing one to specify the level at
which one wants to operate, rather than having to wrap the arguments
in Level functions*)

(*the parameter we need to supply is the last argument in the case statement*)

(*why would we need to use a case statement? well -- we need to
extract the rectangle functions and they happen to fit a
statements extract objects that fit particular patterns from other
objects (heh,at least in mathematica:])*)

(*so we first define the pattern*)


(*note this could also be written thepattern=

(*since we don't really care what level the rectangle functions are at
inside hist,,just supply the Depth[hist] for the level argument...
this will have the effect of searching for the rectangle pattern at
all levels*)


(*note this could also be written Cases[hist,thepattern,Depth[hist]]*)



(*the above command gives you the list of bin splits-- it could also
be written as thesplits=thecases/.thepattern\[Rule]{xmin,xmax}*)


On Sun, 13 Feb 2005 22:17:16 -0500 (EST), Curt Fischer
<tentrillion at> wrote:
> Dear Group:
> How do you find out what value Mathematica has picked for an option set
> to "Automatic", especially when making graphs?
> For example, I want to access the frequency data for a Histogram[] I
> made from a list of 50000 integers.  How do I figure out which bin sizes
> Histogram[] picked if I don't explicitly specify the bin sizes?
> Thanks.
> --
> Curt Fischer

Chris Chiasson
Kettering University
Mechanical Engineering
Graduate Student
1 810 265 3161

  • Prev by Date: Re: Re: Using Select with arrays? (Relative newbie)
  • Next by Date: Re: 2D-Plot Colorings
  • Previous by thread: finding out what Automatic was
  • Next by thread: Re: Re: finding out what Automatic was