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

Class Plot

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

This class creates an image that line graphs, scatter plots and plots of vector fields (arrows) can be drawn on and displayed. Note that the clone() operation is a shallow clone: objects like arrays, the PlotProperties, PlotObjects, the ImagePlus etc. of the clone remain the same as those of the or

Source from the content-addressed store, hash-verified

57 * @author Michael Schmid (axis grid/ticks, resizing/panning/changing range, high-resolution, serialization)
58 */
59public class Plot implements Cloneable {
60 @AstroImageJ(reason = "Position labels vertically inline with the x label")
61 public static final String X_LABEL_V_ANCHOR = "$AIJ-xLabelVAnchor";
62
63 /** Text justification. */
64 public static final int LEFT=ImageProcessor.LEFT_JUSTIFY, CENTER=ImageProcessor.CENTER_JUSTIFY, RIGHT=ImageProcessor.RIGHT_JUSTIFY;
65 /** Legend positions */
66 //NOTE: These have only bits of LEGEND_POSITION_MASK set. The flags of the legend are stored as flags of the legend PlotObject.
67 //These are saved in the flags of the PlotObject class; thus bits up to 0x0f are reserved
68 public static final int TOP_LEFT=0x90, TOP_RIGHT=0xA0, BOTTOM_LEFT=0xB0, BOTTOM_RIGHT=0xC0, AUTO_POSITION=0x80;
69 /** Masks out bits for legend positions; if all these bits are off, the legend is turned off */
70 @AstroImageJ(reason = "Access widen for Vector Plot saving", modified = true)
71 public static final int LEGEND_POSITION_MASK = 0xf0;
72 /** Legend has its curves in bottom-to-top sequence (otherwise top to bottom) */
73 public static final int LEGEND_BOTTOM_UP = 0x100;
74 /** Legend erases background (otherwise transparent) */
75 public static final int LEGEND_TRANSPARENT = 0x200;
76 /** Display points using a circle (5 pixels in diameter if line thickness<=1, otherwise 7). */
77 public static final int CIRCLE = 0;
78 /** Display points using an X-shaped mark. */
79 public static final int X = 1;
80 /** Connect points with solid lines. */
81 public static final int LINE = 2;
82 /** Display points using a square box-shaped mark. */
83 public static final int BOX = 3;
84 /** Display points using an tiangular mark. */
85 public static final int TRIANGLE = 4;
86 /** Display points using an cross-shaped mark. */
87 public static final int CROSS = 5;
88 /** Display points using a single pixel. */
89 public static final int DOT = 6;
90 /** Draw black lines between the dots and a circle with the given color at each dot */
91 public static final int CONNECTED_CIRCLES = 7;
92 /** Display points using an diamond-shaped mark. */
93 public static final int DIAMOND = 8;
94 /** Draw shape using macro code */
95 public static final int CUSTOM = 9;
96 /** Fill area between line plot and x-axis at y=0. */
97 public static final int FILLED = 10;
98 /** Draw a histogram bar for each point (bars touch each other unless the x axis has categories set via the axis label.
99 * x values should be sorted (ascending or descending) */
100 public static final int BAR = 11;
101 /** Draw a free-standing bar for each point. x values should be equidistant and sorted (ascending or descending) */
102 public static final int SEPARATED_BAR = 12;
103 @AstroImageJ(reason = "Custom plot shape")
104 public static final int ARROW_DOWN = 13;
105 @AstroImageJ(reason = "Custom plot shape")
106 public static final int ARROW_UP = 14;
107 @AstroImageJ(reason = "Custom plot shape")
108 public static final int ARROW_LEFT = 15;
109 @AstroImageJ(reason = "Custom plot shape")
110 public static final int ARROW_RIGHT = 16;
111 @AstroImageJ(reason = "Custom plot shape")
112 public static final int ARROW_NORTH_EAST = 17;
113 @AstroImageJ(reason = "Custom plot shape")
114 public static final int ARROW_SOUTH_EAST = 18;
115 @AstroImageJ(reason = "Custom plot shape")
116 public static final int ARROW_SOUTH_WEST = 19;

Callers

nothing calls this directly

Calls 2

getDefaultFontSizeMethod · 0.95
getFontMethod · 0.95

Tested by

no test coverage detected