Skip to content

Commit

Permalink
changed default palette to matplotlib viridis.gp
Browse files Browse the repository at this point in the history
  • Loading branch information
dhmunro committed Sep 12, 2015
1 parent 5b0dfa9 commit 01e228e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions doc/yorick.tex
Expand Up @@ -3690,10 +3690,11 @@
in a palette; that is the size of all of Yorick's predefined palettes.

The palette command allows you to change palettes. The Yorick
distribution comes with predefined palettes called @file{earth.gp} (the
default palette), @file{gray.gp}, @file{yarg.gp}, @file{heat.gp},
@file{stern.gp}, and @file{rainbow.gp}. To load the gray palette, you
would type:
distribution comes with predefined palettes called @file{viridis.gp}
(the default palette), @file{inferno.gp}, @file{magma.gp},
@file{plasma.gp}, @file{coolwarm.gp}, @file{earth.gp}, @file{gray.gp},
@file{yarg.gp}, @file{heat.gp}, @file{stern.gp}, and @file{rainbow.gp}.
To load the gray palette, you would type:

@example
palette, "gray.gp"
Expand Down
2 changes: 1 addition & 1 deletion i/demo2.i
Expand Up @@ -64,7 +64,7 @@ func demo2(which, time_limit)
dt= 0.375*sqrt(min(abs(xdz*yzd - xzd*ydz)));

window, 0, wait=1, style="nobox.gs";
palette, "heat.gp";
palette, "inferno.gp";
limits, -1, 1, -1, 1;

/* roll the filled mesh movie */
Expand Down
4 changes: 2 additions & 2 deletions i/demo5.i
Expand Up @@ -119,8 +119,8 @@ func demo5(itest)
timer_print,"slicing time",elapsed-elapsed0;

fma;
write, "split_palette,\"earth.gp\" -- generate palette for pl3tree";
split_palette, "earth.gp";
write, "split_palette,\"viridis.gp\" -- generate palette for pl3tree";
split_palette, "viridis.gp";
write, "gnomon -- turn on gnomon";
gnomon, 1;

Expand Down
2 changes: 1 addition & 1 deletion i/slice3.i
Expand Up @@ -1238,7 +1238,7 @@ func split_palette(name)
palette,query=1, r,g,b;
n= numberof(r);
if (n<100) {
palette, "earth.gp";
palette, "viridis.gp";
palette,query=1, r,g,b;
n= numberof(r);
}
Expand Down
5 changes: 3 additions & 2 deletions i0/graph.i
Expand Up @@ -716,7 +716,8 @@ extern palette;
dozens more named palette choices.

The FILENAME is the name of a Gist palette file; the standard
palettes are "earth.gp", "stern.gp", "rainbow.gp", "heat.gp",
palettes are "viridis.gp", "magma.gp", "inferno.gp", "plasma.gp",
"coolwarm.gp", "earth.gp", "stern.gp", "rainbow.gp", "heat.gp",
"gray.gp", and "yarg.gp". Use the maxcolors keyword in the
pldefault command to put an upper limit on the number of
colors which will be read from the palette in FILENAME.
Expand Down Expand Up @@ -2108,7 +2109,7 @@ func plfc(z, y, x, ireg, levs=, colors=, region=, triangle=)
palette, query=1, nc, yc, xc;
nc= numberof(nc);
if (nc<3) {
palette, "earth.gp";
palette, "viridis.gp";
palette, query=1, nc, yc, xc;
nc= numberof(nc);
}
Expand Down
2 changes: 1 addition & 1 deletion yorick/graph.c
Expand Up @@ -1909,7 +1909,7 @@ static void CheckDefaultPalette(void)
{
GpColorCell *palette;
GhGetPalette(-1, &palette);
if (!palette) GhReadPalette(-1, defaultPalette? defaultPalette : "earth.gp",
if (!palette) GhReadPalette(-1, defaultPalette? defaultPalette : "viridis.gp",
&palette, maxColors);
}

Expand Down

0 comments on commit 01e228e

Please sign in to comment.