Add syntax highlighting in readme
This commit is contained in:
@@ -7,19 +7,19 @@ Mathematica port of matplotlib colormaps Magma, Inferno, Plasma, Viridis, and Ci
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
To import this package, either download `MPLColorMap.m` and import the file using
|
To import this package, either download `MPLColorMap.m` and import the file using
|
||||||
```
|
```Mathematica
|
||||||
<< "path/to/MPLColorMap.m";
|
<< "path/to/MPLColorMap.m";
|
||||||
```
|
```
|
||||||
or import the file from this web server using
|
or import the file from this web server using
|
||||||
```
|
```Mathematica
|
||||||
<< "https://git.mieling.net/Thomas/MPL-Colormaps-Mathematica/raw/branch/master/MPLColorMap.m";
|
<< "https://git.mieling.net/Thomas/MPL-Colormaps-Mathematica/raw/branch/master/MPLColorMap.m";
|
||||||
```
|
```
|
||||||
|
|
||||||
The various color maps are then available as `MPLColorMap["Viridis"]` etc.
|
The various color maps are then available as `MPLColorMap["Viridis"]` etc.
|
||||||
For example:
|
For example:
|
||||||
```
|
```Mathematica
|
||||||
DensityPlot[Sin[x] Sin[y], {x, 0, 2 \[Pi]}, {y, 0, 2 \[Pi]},
|
DensityPlot[Sin[x] Sin[y], {x, 0, 2 \[Pi]}, {y, 0, 2 \[Pi]},
|
||||||
ColorFunction -> MPLColorMap["Viridis"]]
|
ColorFunction -> MPLColorMap["Viridis"]]
|
||||||
```
|
```
|
||||||
produces the following image:
|
produces the following image:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user