Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Re: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52344] Re: [mg52321] Re: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data
  • From: Yasvir Tesiram <yat at omrf.ouhsc.edu>
  • Date: Wed, 24 Nov 2004 02:32:15 -0500 (EST)
  • References: <200411211223.HAA02205@smc.vnet.net> <cns1p1$e1j$1@smc.vnet.net> <200411230712.CAA29347@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
I never thought about what would happen if Chemical Elements and Colors  
were loaded together. And it seems like a good idea to at rename them.  
My curiosity bugged me. So, I tried this:

Needs["Miscellaneous`ChemicalElements`"]
Needs["Graphics`Colors`"]

$Version
5.0 for Mac OS X (November 19, 2003)

?Miscellaneous`ChemicalElements`AtomicNumber

OK, this is fine.

?Gold

This is fine too. Although I loaded ChemicalElements first,  
Graphics`Colors` actually ends up first in  $ContextPath. But here I  
try this and I get the wrong result.

Miscellaneous`ChemicalElements`AtomicNumber[Gold]

Which leads me to the correct but long winded syntax when two packages  
using the same symbols appear in $ContextPath

Miscellaneous`ChemicalElements`AtomicNumber[Miscellaneous`ChemicalElemen 
ts`Gold]

I guess we could call it JavaMatica! Its just scoping.

Renaming them seems easier but of course may have undesirable effects  
somewhere else.

As for David Parks message initial message below, I think that it's  
because GrayLevel is now no longer used in the Colors package and  
that's why Black doesn't work either in 5.1. And its not about scoping  
anymore. Actually, to be more accurate, not only is it not used in the  
package it seems to be incompatible with the Colors package. How this  
has happened is beyond me. But it is unfortunate, because in many of my  
applications (not only for me but for numerous other people who use the  
packages written here), GrayLevels and RGBColor are used side by side.  
In our case, this involves say representing a colored region denoting  
some functional part of the brain overlaid on a GrayLevel brain image.  
But I really haven't tested it any more than my initial response. I  
really don't want to go and recode things and then I have to think  
about backwards compatibility as well. I think the Colors package is  
fantastic, saves quite a bit of typing, "real names" are used so that a  
human can imagine the color etc, etc.

Cheers
Yas


On Nov 23, 2004, at 1:12 AM, John Jowett wrote:

>
> "Yasvir Tesiram" <tesiramy at omrf.ouhsc.edu> wrote in message
> news:cns1p1$e1j$1 at smc.vnet.net...
>> G'day David,
>>
>> Very curious. I just checked and indeed all works fine with 5.0 but  
>> Gray
>> isn't liked much in 5.1. Neither is Black, another color defined by
>> GrayLevel. Other colors defined by RGB seems to work fine though.
>> There probably is a good reason floating around somewhere.
>>
>
> Hello,
>         Not having 5.1 yet, I don't know exactly what the problem is  
> but one
> good reason might be that some of the colours in Graphics`Colors` have  
> names
> that clash with other useful packages.  Because of this, I have long  
> had a
> private version which loads with the following message:
>
> Graphics`Colors` - loading modified version of this standard package in
> which \
> the colors
> {Cobalt, Gold, Gray, Titanium, Zinc}
> have been renamed:
> {CobaltColor, GoldColor, GrayColor, TitaniumColor, ZincColor}
> to eliminate clashes with the standard packages
> Miscellaneous`ChemicalElements` and Miscellaneous`Units`.
>
> I'm not sure if this explains a problem with Black though.
>
> John Jowett


  • Prev by Date: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data
  • Next by Date: Re: Re: Piecewise symbol in 5.1
  • Previous by thread: Re: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data
  • Next by thread: Re: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data