comparison artifacts/src/main/java/org/dive4elements/river/jfree/JFreeUtil.java @ 9556:9b8e8fc1f408

Use facetName in all processors as themeType for legend aggregation.
author gernotbelger
date Tue, 23 Oct 2018 16:26:58 +0200
parents e4606eae8ea5
children
comparison
equal deleted inserted replaced
9555:ef5754ba5573 9556:9b8e8fc1f408
104 return new double[][] { x, y }; 104 return new double[][] { x, y };
105 } 105 }
106 106
107 107
108 public static StyledXYSeries sampleFunction2D( 108 public static StyledXYSeries sampleFunction2D(
109 String facetName,
109 Function func, 110 Function func,
110 ThemeDocument theme, 111 ThemeDocument theme,
111 String seriesKey, 112 String seriesKey,
112 int samples, 113 int samples,
113 double start, 114 double start,
114 double end 115 double end
115 ) { 116 ) {
116 StyledXYSeries series = new StyledXYSeries(seriesKey, theme); 117 StyledXYSeries series = new StyledXYSeries(facetName,seriesKey, theme);
117 118
118 double step = (end - start) / (samples - 1); 119 double step = (end - start) / (samples - 1);
119 120
120 for (int i = 0; i < samples; i++) { 121 for (int i = 0; i < samples; i++) {
121 double x = start + (step * i); 122 double x = start + (step * i);
124 125
125 return series; 126 return series;
126 } 127 }
127 128
128 public static StyledXYSeries sampleFunction2DPositive( 129 public static StyledXYSeries sampleFunction2DPositive(
130 String facetName,
129 Function func, 131 Function func,
130 ThemeDocument theme, 132 ThemeDocument theme,
131 String seriesKey, 133 String seriesKey,
132 int samples, 134 int samples,
133 double start, 135 double start,
134 double end 136 double end
135 ) { 137 ) {
136 StyledXYSeries series = new StyledXYSeries(seriesKey, theme); 138 StyledXYSeries series = new StyledXYSeries(facetName,seriesKey, theme);
137 139
138 double step = (end - start) / (samples - 1); 140 double step = (end - start) / (samples - 1);
139 141
140 for (int i = 0; i < samples; i++) { 142 for (int i = 0; i < samples; i++) {
141 double x = start + (step * i); 143 double x = start + (step * i);

http://dive4elements.wald.intevation.org