@ClusteredMining 물었다 히트 맵 만들기 - 그래디언트의 각 색상에 대한 값을 어떻게 정의합니까?. 이것은 질문에 대한 정확한 대답은 아니지만 아마도 그럴 것입니다. GradientFunction과 색상 목록을 사용하면 세 번째 색상에서 매우 선명한 경계를 얻을 수 있습니다. 선명한 경계선을 생성하기 위해 긴 색상 목록을 조정하여 다양한 변형이 가능합니다. 또는 흐릿하여 더 예뻐 보일 수 있습니다.
GradientFunction에는 " 여기서 Z값은? " 해당 기능은 데이터가 테이블에 있고 그리드가 제대로 표시되지 않기 때문에 즉시 사용하지 못할 수 있습니다.
편집: 아마도 totalWidth를 더 작게 만드는 것보다 더 크게 만들어야 합니다. 가장자리 배치의 정밀도를 제어하는 colorList의 색상 수를 제어합니다. 그리드 값도 조금 더 크게 만들어야 합니다. grid=100 및 totalWidth=100은 50 및 10보다 더 합리적으로 보입니다.
// these are in units of the Z value
range = {100, 400}; // the range of the color list; the formula a*b on the axis 10..20 makes these numbers
targetValue = 200; // happens to go through the corners for this example.
// grid: this determines how many points are evaluated by GradientFunction
grid = 50; // subdivisions, more looks smoother, is slower. typically 50 to 500. 667 may be a limit.
// how many colors in the colorList
thick = 0.050; // thickness of division line, can be 0. 50% is really fat (0.5)
totalWidth = 10; // make this smaller for a blurred edge, maybe 10 or 100 instead of 1000, which has a sharper edge
targetWidth = Round( thick * totalWidth );// making the green target about 10%, so kind of thick
otherwidth = totalWidth - targetWidth; // the ratios, below, divides this in parts
lowRatio = (targetValue - range[1]) / (range[2] - range[1]);// the red
highRatio = 1 - lowRatio;// the blue
// this list is a bunch of repeated reds, a few greens, and a
// bunch of blues. The greens are centered at the targetValue.
colorList = {};
Insert Into( colorList, As List( Repeat( RGB Color( .4, 0, 0 ), Round( otherwidth * lowRatio ) ) ) );
Insert Into( colorList, As List( Repeat( RGB Color( 0, .6, 0 ), targetWidth ) ) );
Insert Into( colorList, As List( Repeat( RGB Color( 0, 0, .4 ), Round( otherwidth * highRatio ) ) ) );
New Window( "target=" || Char( targetValue ),
g = Graph Box(
X Scale( 10, 20 ),
Y Scale( 10, 20 ),
framesize( 600, 400 ),
Gradient Function(
a * b,
a,
b,
Matrix( range ), // range to map the colors onto
Z Color( colorList ),
<<XGRID></XGRID>
grid, width 및 totalThick을 사용하여 흥미로운 그래프를 얻습니다.
A thin sharply defined green region between red and blue.A thin sharply defined green region between red and blue.A thin sharply defined green region between red and blue.A thin sharply defined green region between red and blue.A thin sharply defined green region between red and blue.빨간색과 파란색 사이에 선명하게 정의된 얇은 녹색 영역입니다.
Thicker, and still sharp.Thicker, and still sharp.Thicker, and still sharp.Thicker, and still sharp.Thicker, and still sharp.더 두껍고 여전히 날카롭습니다.
Thicker, and blurry.Thicker, and blurry.Thicker, and blurry.Thicker, and blurry.Thicker, and blurry.더 두껍고 흐릿합니다.