MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / descaleY

Method descaleY

ij/src/main/java/ij/gui/Plot.java:1951–1960  ·  view source on GitHub ↗

Converts pixels to calibrated coordinates. In contrast to the image calibration, also works with log axes

(int y)

Source from the content-addressed store, hash-verified

1949 /** Converts pixels to calibrated coordinates. In contrast to the image calibration, also
1950 * works with log axes */
1951 @AstroImageJ(reason = "Support scalable plots", modified = true)
1952 public double descaleY(int y) {
1953 if (yMin == yMax) return yMin;
1954 if (isAijPlot()) {
1955 y = (int) (y / Prefs.getGuiScale());
1956 }
1957 double yv = (yBasePxl-y)/yScale +yMin;
1958 if (logYAxis) yv = Math.pow(10, yv);
1959 return yv;
1960 }
1961
1962
1963 /** Converts calibrated coordinates to pixel coordinates. In contrast to the image calibration, also

Callers 7

toScaledMethod · 0.95
zoomToRectMethod · 0.95
zoomMethod · 0.95
getCoordinatesMethod · 0.95
mousePressedMethod · 0.80

Calls 2

isAijPlotMethod · 0.95
getGuiScaleMethod · 0.95

Tested by

no test coverage detected