MathGroup Archive 2008

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

Search the Archive

Re: ListPlot still ignores SetOptions[] command

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90557] Re: ListPlot still ignores SetOptions[] command
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Sun, 13 Jul 2008 15:46:35 -0400 (EDT)
  • References: <g56tg1$3vr$1@smc.vnet.net>

lehin.p at gmail.com wrote:
> Hello,
> In version 6.03 some bug in ListPlot is fixed and the following code
> works well:
> 
> SetOptions[ListPlot, Joined -> True];
> ListPlot[Range[50]^2]
> 
> But adding Mesh -> All is ignored:
> 
> SetOptions[ListPlot, Mesh -> All, Joined -> True];
> ListPlot[Range[50]^2]
> 
> As I understand the bug is still here.
> 
While this is no doubt a bug, I would never use SetOptions on built-in 
functions. To me, this practice is somewhat akin to Unprotect-ing a 
built-in function and changing its definition.

Sooner or later you may want to incorporate a chunk of someone else's 
code, and then you will get confusion.

A much better approach is to write a myListPlot function that uses 
options itself, and which passes its option values down to ListPlot.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Multiple Executions of .nb file part2
  • Next by Date: Re: ListPlot still ignores SetOptions[] command
  • Previous by thread: ListPlot still ignores SetOptions[] command
  • Next by thread: Re: ListPlot still ignores SetOptions[] command