fix plot crowding

This commit is contained in:
2026-03-26 01:11:28 -07:00
parent 7a37c15d54
commit 673b2cae6b
2 changed files with 5 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ Reference for future implementation. Grouped by value to typical SPM workflows.
| 11 | Grain Distance Transform | mask_edt.c | Euclidean distance from grain boundaries. Useful for spatial distribution analysis. |
| 12 | Watershed Segmentation | grain_wshed.c | Automatic grain detection without manual threshold. More robust than simple thresholding. |
| 13 | Rotate / Flip | rotate.c, basicops.c | Basic geometric transforms (90°, arbitrary angle, mirror). |
| 14 | Crop | crop.c | Extract sub-region of a field. |
| ~~14~~ | ~~Crop~~ | ~~crop.c~~ | ~~Extract sub-region of a field.~~ **DONE** |
## Medium Value

View File

@@ -164,8 +164,10 @@ export default function LinePlotOverlay({
const cursorB = pickCursorPoint(x2 ?? overlay?.x2 ?? 0.75);
const path = yValues.map((y, i) => `${i === 0 ? 'M' : 'L'} ${scaleX(xValues[i])} ${scaleY(y)}`).join(' ');
const xTicks = makeTicks(xMin, xMax);
const yTicks = makeTicks(yMin, yMax);
const xTickCount = Math.max(2, Math.min(5, Math.floor(plotWidth / 70)));
const yTickCount = Math.max(2, Math.min(5, Math.floor(plotHeight / 40)));
const xTicks = makeTicks(xMin, xMax, xTickCount);
const yTicks = makeTicks(yMin, yMax, yTickCount);
const plotStroke = clamp(plotWidth / 240, 1.4, 2.6);
const gridStroke = clamp(plotWidth / 900, 0.6, 1.1);
const cursorStroke = clamp(plotWidth / 220, 1.4, 2.2);