Asignación de colores disponibles en una respuesta: puede usar un tema de color integrado en JMP, o puede crear una asignación personalizada con herramientas en JMP. Tendrá que escribir JSL para usar un mapeo personalizado; no será un tema
Usando un tema incorporado: la función HeatColor mapea un número entre cero y uno en un color. Este ejemplo utiliza dos temas, "jet" y "espectral", y crea la siguiente imagen.
New Window( "Example", Graph Box( Y Scale( -0.6, 1.6 ), X Scale( -5, 105 ),
framesize( 700, 300 ), Marker Size( 6 ), suppressAxes,
For( x = 0, x <= 100, x += .0625,
Pen Color( Heat Color( x / 100, "jet" ) );
Line( {x, 0}, {x, .5} );
Pen Color( Heat Color( x / 100, "spectral" ) );
Line( {x, .6}, {x, 1.1} );
);
Text Color( "black" );
Text( right justified, {98, .1}, "jet color interpolation" ); // use right
Text( right justified, {98, .7}, "spectral color interpolation" ); // justification
)
);

más en HeatColor: Funciones graficas
Los temas integrados son agradables y amigables y fáciles de usar, pero es posible que necesites algo diferente. El siguiente ejemplo muestra dos funciones diferentes en JMP para la interpolación: Interpolate y SplineEval. Ambos tienen pros y contras. Primero, el código para la foto:
smooth = 300; // bigger numbers make a stiffer spline
xRange = 0 :: 100; // graph plotted over this range
// greenX,greenY define 5 "control" points for the color; the Y value is the green in RGB
greenX = [0 3 5 7 10] ^ 2; // unevenly spaced points in X: [0 9 25 49 100]
greenY = [0.1 0.4 0.9 0.4 0.1]; // uneven in Y too
// greenCoef is computed once, used a lot in the evaluator
greenCoef = Spline Coef( greenX, greenY, smooth ); // make the coefficients once
greenSpline = Spline Eval( xRange, greenCoef ); //use them here, and below
// greenSpline as a matrix of Ys for each X in the xRange argument
// or...linear piece-wise interpolation (the first argument must be a scalar at this time)
greenLinear = J( 1, N Cols( xRange ), 0 ); // unlike spline, for now at least,
For( i = 1, i <= N Cols( xRange ), i++, // interpolate generates one answer per call
greenLinear[i] = Interpolate( xRange[i], greenX, greenY ); // edgy version of smooth spline
);
// graph the spline and linear colors
New Window( "Example", Graph Box( Y Scale( -0.6, 1.6 ), X Scale( -5, 105 ),
framesize( 700, 300 ), Marker Size( 6 ), suppressAxes,
Pen Color( "green" ); Pen Size( 5 );
Line( xRange, greenSpline ); // draw the smooth spline, thick, green
Pen Color( "blue" ); Pen Size( 3 );
Line( xRange, greenLinear ); // draw the pointy linear interpolation, thinner, blue
// next, draw the large black round marker dots...
Marker( Combine States( Color State( "black" ), Marker State( 12 ) ), greenX, greenY );
// draw the horizontal color bars, above and below the graph
Pen Size(1);
For( x = 0, x <= 100, x += .0625, // generate enough short vertical lines to make a
// solid patch of color. set the color of each line by spline...
Pen Color( RGB Color( 0, Spline Eval( x, greenCoef ), .5 ) ); // use the coefficients again
Line( {x, 1.1}, {x, 1.5} ); // color bar above the graph is for spline
Pen Color( RGB Color( 0, Interpolate( x, greenX, greenY ), .5 ) ); // set color by linear
Line( {x, -.1}, {x, -.5} ); // color bar below graph is linear interpolation
);
// label the color bars. Should work OK with reasonable sized fonts...
Text Color( "white" ); // lands on top of the dark part of the color bar
Text( right justified, {98, -.4}, "linear color interpolation" ); // use right
Text( right justified, {98, 1.2}, "spline color interpolation" ); // justification
)
);

La imagen muestra una curva de spline verde y una curva de interpolación lineal azul. Ambas curvas están construidas para los 5 puntos de control negros. La parte superior de la imagen muestra una barra de color configurada al establecer el componente de color verde en el valor de la curva de spline verde. La parte inferior de la imagen muestra una barra de color similar, pero el componente verde proviene de la interpolación lineal.
Es posible que ya te hayas distraído con un punto demasiado brillante en la barra inferior. No te preocupes, no está realmente allí, está relacionado con Bandas de Mach - Wikipedia, la enciclopedia libre . Pero es una razón por la que puede preferir la interpolación spline. La interpolación de spline tiene diferentes problemas, principalmente alrededor de debajo y sobre disparo. La barra superior nunca se vuelve tan verde brillante como la barra inferior. Y es difícil decirlo en este caso, pero también cae por debajo del punto final. La primera línea en el JSL anterior, suave = 300, está configurando la rigidez / tensión de la ranura. Tendrás que elegir un valor que funcione para tu aplicación.
En el ejemplo de HeatColor, podría transformar el argumento 0..1 (con SQRT quizás) para estirar los colores. Tanto con spline como con interpolación, puede estirar / aplastar el espacio de color (como lo hizo este ejemplo) colocando tantos puntos de control como sea necesario. También puede agregar los canales rojo y azul, y darles sus propios perfiles.
Los archivos adjuntos son los mismos que el código en la publicación.
más en SplineEval: Notas adicionales
más sobre Interpolar: Funciones condicionales
Se actualizó el 4 de enero de 2017 para el formateo y reparación de código que no sobrevivió a la conversión del formato de blog anterior.