Move examples to .m file

This commit is contained in:
Thomas Mieling
2022-04-24 12:20:09 +02:00
parent c73104e24c
commit 7b54999ab9
2 changed files with 19 additions and 23636 deletions

19
examples/Example.m Normal file
View File

@@ -0,0 +1,19 @@
(* ::Package:: *)
(* ::Input:: *)
(*<<(FileNameJoin[{NotebookDirectory[],"..","MPLColorMap.m"}]);*)
(* ::Input:: *)
(*barLegend[style_]:=BarLegend[{MPLColorMap[style],{0,1}},LegendLabel->style];*)
(*GraphicsRow[barLegend/@{"Magma","Inferno","Plasma", "Viridis", "Cividis"},ImageSize->Full,Method->{"ShrinkWrap"->True}]*)
(* ::Input:: *)
(*plotDemo2d[style_]:=DensityPlot[Sin[x]Cos[y],{x,0,2\[Pi]},{y,0,2\[Pi]},ColorFunction->MPLColorMap[style],PlotLabel->style,Method->{"ShrinkWrap"->True}];*)
(*GraphicsGrid[Map[plotDemo2d,{{"Magma","Inferno","Plasma"},{ "Viridis", "Cividis"}},{2}],ImageSize->Full]*)
(* ::Input:: *)
(*plotDemo3d[style_]:=Plot3D[Sin[x]Cos[y],{x,0,2\[Pi]},{y,0,2\[Pi]},ColorFunction->{MPLColorMap[style][#3]&},PlotLabel->style,Method->{"ShrinkWrap"->True}];*)
(*GraphicsGrid[Map[plotDemo3d,{{"Magma","Inferno","Plasma"},{ "Viridis", "Cividis"}},{2}],ImageSize->Full]*)