Group Abstract Group Abstract

Message Boards Message Boards

Scientific color maps

4 Replies

Nice. I've used the "hacky" DataPacletsColorDataDump` method for my own color schemes.

You implicitly raised a question:

It would be nice if there would be a config file you can place somewhere with custom color functions that are picked up upon opening Mathematica.

Do you mean the init.m file?

POSTED BY: Michael Rogers

Yes and no, The init.m file can handle the initial definitions and loading, but then there is still some code needed to hack into the DataPacletsColorDataDump. I was hoping to find the location where the color functions are defined and which functions actually generates the datadump. So inject the color definitions before Colordatadump is activated.

POSTED BY: Martijn Froeling

I'm not sure what you're doing differently from me. I have no trouble adding my own color scheme to the ColorData database in my init.m file. I used ColorData[1]; instead of ColorData[]; to load the built-in database, but I doubt that is significant.

In any case, the data is stored in binary format in the file (at least on a Mac):

$InstallationDirectory/SystemFiles/Kernel/SystemResources/64Bit/DataPaclets/ColorData.mx

Alternatively, you can locate the file with the following:

FileNameJoin[{System`Private`$SystemFileDir, 
   ContextToFileName["DataPaclets`ColorData`"]}] <> "x"

I don't think you can do much with the file though, other than load it and then amend the database. Or get WRI to accept your color schemes as part of the Mma distribution.

POSTED BY: Michael Rogers

Thanks, i will have a look to see what i can do there.

POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard