Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

how do I get the name and definition of a builtin Mathematica functions? For instance, I would like to see how default Tick plotting function is implemented. However, it is not clear where it is and what is its name, because its name never appears for the user. Example:

Plot[ {Sin[x], Cos[x]}, {x, 0, 3 Pi}, Frame -> True, FrameTicks -> {None, Automatic}]

Basically I want to know, how do I get the name of the function called under the Automatic label? Thanks!

share|improve this question
1  
Look at FindDivisions. This gives you something that is reasonably close to what is actually used. –  rcollyer Sep 4 at 16:26
    
I fear there is no straightforward way for many Automatically set options. You need to don you helmet, grab your pickaxe and prepare for world-class spelunking (mind you, there are several experienced miners around here). –  Yves Klett Sep 4 at 16:29
    
@rcollyer thanks! This is was the underlying reason for the question. To know the general answer would be very interesting, though –  Karolis Sep 4 at 16:47
1  
To see the effect of an Automatic option you can often use AbsoluteOptions; however, this is broken in v10. Using v9, plt = Plot[{Sin[x], Cos[x]}, {x, 0, 3 Pi}, Frame -> True, FrameTicks -> {None, Automatic}]; AbsoluteOptions[plt, FrameTicks] –  Bob Hanlon Sep 4 at 17:40

2 Answers 2

up vote 6 down vote accepted

We can start with:

Names["*`*Ticks*"]

(* { ...
   , System`Dump`FrameTicksToBoxes
   , ...
   , System`Dump`ParseFrameTicks
   , ...
   , System`Dump`ProcessSymbolicFrameTicks
   , System`Dump`ProcessSymbolicFrameTicksStyle
   , ...
   }
*)

Some of the returned names are suggestive. We can examine their definitions using, for example, ?? System`Dump`ParseFrameTicks.

The Mathematica documentation actively encourages spelunking. See this question about spelunking tools for more information about viewing the in-memory definitions of functions.

share|improve this answer

The Commands (and its variants);

?? Plot
Attributes[Plot]
Options[Plot]
Information["*Tick*"]
Documentation`HelpLookup["*Tick*"]

will be of some help and provide additional Information. The latter will open a Help-Window.

Check also:

How can one find undocumented options or option values in Mathematica?

What are some useful, undocumented Mathematica functions?

enter image description here

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.