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

Method labelsInBraces

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

Returns the array of categories from an axis label in the form {cat1,cat2,cat3}, or null if not this form @param labelCode can be 'x' or 'y', for the x or y axis label

(char labelCode)

Source from the content-addressed store, hash-verified

3008 /** Returns the array of categories from an axis label in the form {cat1,cat2,cat3}, or null if not this form
3009 * @param labelCode can be 'x' or 'y', for the x or y axis label*/
3010 @AstroImageJ(reason = "Access widen for Vector Plot saving", modified = true)
3011 public String[] labelsInBraces(char labelCode) {
3012 String s = getLabel(labelCode);
3013 if (s.startsWith("{") && s.endsWith("}")) {
3014 String inBraces = s.substring(1, s.length() - 1);
3015 String[] catLabels = inBraces.split(",");
3016 return catLabels;
3017 } else {
3018 return null;
3019 }
3020 }
3021
3022 /** Returns the smallest "nice" number >= v. "Nice" numbers are .. 0.5, 1, 2, 5, 10, 20 ... */
3023 @AstroImageJ(reason = "Access widen for Vector Plot saving", modified = true)

Callers 5

getMinAndMaxMethod · 0.95
drawBarChartMethod · 0.95
drawBarChartMethod · 0.80

Calls 5

getLabelMethod · 0.95
startsWithMethod · 0.80
substringMethod · 0.80
lengthMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected