Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: options in Plot
Replies: 1   Last Post: Dec 20, 2012 3:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Bob Hanlon

Posts: 891
Registered: 10/29/11
Re: options in Plot
Posted: Dec 20, 2012 3:19 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

{#, Attributes[#]} & /@ {Plot, ListPlot}

{{Plot, {HoldAll, Protected, ReadProtected}}, {ListPlot, {Protected,
ReadProtected}}}

Plot has the attribute HoldAll. As always you need to use Evaluate to
override the HoldAll.

opts = {Frame -> True, GridLines -> {{1}, {1}}};

Plot[x, {x, 0, 1}, Evaluate[opts]]


Bob Hanlon


On Wed, Dec 19, 2012 at 4:55 AM, Nigel King
<nigel.king@cambiumnetworks.com> wrote:
>
> Hi MathGroup,
> Most Graphic functions allow applying a collection of options as in
> opts = {Frame -> True, GridLines -> {{1}, {1}}}
>
> One can then use the opts in the following plots
> ListPlot[{{1, 1}}, opts]
> Plot[x, {x, 0, 1}, opts]
> The ListPlot works as expected, the Plot does not. It results with
> Plot[x, {x, 0, 1}, opts]
>
> I believe that this is a change from M8 to M9.
>
> Is this a bug or intended functionality?
>
> Thanks
>
> Nigel King
>
>





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.