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

Method show

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

Displays the plot in a PlotWindow. Plot stacks are shown in a StackWindow, not in a PlotWindow; in this case the return value is null (use getImagePlus().getWindow() instead). Also returns null in BatchMode. Note that the PlotWindow might get closed immediately if its 'listValues' and 'autoClose

()

Source from the content-addressed store, hash-verified

1749 * @see #update()
1750 */
1751 public PlotWindow show() {
1752 PlotVirtualStack stack = getStack();
1753 if (stack!=null) {
1754 getImagePlus().show();
1755 return null;
1756 }
1757 if ((IJ.macroRunning() && IJ.getInstance()==null) || Interpreter.isBatchMode()) {
1758 imp = getImagePlus();
1759 imp.setPlot(this);
1760 WindowManager.setTempCurrentImage(imp);
1761 if (getMainCurveObject() != null) {
1762 imp.setProperty("XValues", getXValues()); // Allows values to be retrieved by
1763 imp.setProperty("YValues", getYValues()); // by Plot.getValues() macro function
1764 }
1765 Interpreter.addBatchModeImage(imp);
1766 return null;
1767 }
1768 if (imp != null) {
1769 Window win = imp.getWindow();
1770 if (win instanceof PlotWindow && win.isVisible()) {
1771 updateImage(); // show in existing window
1772 return (PlotWindow)win;
1773 } else
1774 setImagePlus(null);
1775 }
1776 PlotWindow pw = new PlotWindow(this); //note: this may set imp to null if pw has listValues and autoClose are set
1777 if (IJ.isMacro() && imp!=null) // wait for plot to be displayed
1778 IJ.selectWindow(imp.getID());
1779 return pw;
1780 }
1781
1782 /**
1783 * Appends the current plot to a virtual stack and resets allPlotObjects

Callers 15

plotHistogramMethod · 0.95
runMethod · 0.95
runMethod · 0.95
plotMethod · 0.95
multiPlotMethod · 0.95
analyzeMethod · 0.95
showPlotMethod · 0.95
plotMethod · 0.95
createWindowMethod · 0.95
runMethod · 0.95
updatePlotMethod · 0.95
showProgressMethod · 0.45

Calls 15

getStackMethod · 0.95
getImagePlusMethod · 0.95
macroRunningMethod · 0.95
getInstanceMethod · 0.95
isBatchModeMethod · 0.95
setTempCurrentImageMethod · 0.95
getMainCurveObjectMethod · 0.95
getXValuesMethod · 0.95
getYValuesMethod · 0.95
addBatchModeImageMethod · 0.95
updateImageMethod · 0.95
setImagePlusMethod · 0.95

Tested by

no test coverage detected