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

Method addObjectFromPlot

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

Add the i-th PlotObject (in the sequence how they were added, including hidden ones) from another plot to this one. PlotObjects here refers to curves, arrows, labels etc. (not legend, axes and frame, though implemented as PlotObjects) Use 'update' to update the plot thereafter. @return Index of

(Plot plot, int i)

Source from the content-addressed store, hash-verified

1473 * Use 'update' to update the plot thereafter.
1474 * @return Index of the plotObject added in the sequence they were added */
1475 public int addObjectFromPlot(Plot plot, int i) {
1476 PlotObject plotObject = plot.getPlotObjectDeepClone(i);
1477 plotObject.unsetFlag(PlotObject.CONSTRUCTOR_DATA);
1478 allPlotObjects.add(plotObject);
1479 int index = allPlotObjects.size() - 1;
1480 return index;
1481 }
1482
1483 /** Get the style of the i-th PlotObject (curve, label, ...) in the sequence
1484 * they were added (including hidden ones), as String with comma delimiters:

Callers 1

fromPlotMethod · 0.45

Calls 4

unsetFlagMethod · 0.95
addMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected