Commit d536a47
committed
Make it possible to set custom tick positions and labels with the
To set custom tick positions use the `tick_positions` axis option. Set
that to a reference to an array containing the positions on the axis
that ticks are desired. For example, `tick_positions => [ 2, 5, 9 ]`
will place ticks at positions 2, 5, and 9 on the axis. Note that when
this option is used the `tick_delta`, `tick_scale`, and `tick_distance`
options are not used. So only the given tick positions will appear in
the graph.
To set custom tick labels use the `tick_labels` option. Note that this
is not a new option, but now it accepts a new type of value. Previously
this was purely boolean (0 or 1), and it only determined if tick labels
would be shown or not. Now it can take a value that is a reference to a
hash. The keys of the hash are tick positions, and the values are the
labels to be placed at those positons. Note that formatting of the label
must be done by the auther, and the `tick_label_format` option is
ignored for any label provided in this hash. If a major tick is not
listed in the hash, then the position will be used for the label and it
will be formatted according to the `tick_label_format` option.
This is intended to replace what is done in #1374 and is a more flexible
approach than what is done there. In that pull request the capability
for custom tick labels only is added, and it is extremely restrictive in
what it can do. Only positive tick labels can be customized, and it
requires that the problem author label all major ticks (there is no
fallback and a tick is labeled "undefined" if one is missing).plots.pl macro.1 parent 9766e9f commit d536a47
4 files changed
Lines changed: 116 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
| 89 | + | |
| 90 | + | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
219 | | - | |
| 228 | + | |
220 | 229 | | |
221 | 230 | | |
222 | 231 | | |
| |||
280 | 289 | | |
281 | 290 | | |
282 | 291 | | |
283 | | - | |
| 292 | + | |
284 | 293 | | |
285 | 294 | | |
286 | 295 | | |
| |||
352 | 361 | | |
353 | 362 | | |
354 | 363 | | |
355 | | - | |
| 364 | + | |
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
| |||
451 | 460 | | |
452 | 461 | | |
453 | 462 | | |
454 | | - | |
| 463 | + | |
455 | 464 | | |
456 | 465 | | |
457 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
106 | 134 | | |
107 | 135 | | |
108 | 136 | | |
| |||
133 | 161 | | |
134 | 162 | | |
135 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
136 | 173 | | |
137 | 174 | | |
138 | 175 | | |
| |||
316 | 353 | | |
317 | 354 | | |
318 | 355 | | |
| 356 | + | |
319 | 357 | | |
320 | 358 | | |
321 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
224 | 230 | | |
| 231 | + | |
225 | 232 | | |
226 | 233 | | |
227 | 234 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
231 | 247 | | |
232 | 248 | | |
233 | 249 | | |
234 | | - | |
| 250 | + | |
235 | 251 | | |
236 | 252 | | |
237 | 253 | | |
| |||
246 | 262 | | |
247 | 263 | | |
248 | 264 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
257 | 279 | | |
| 280 | + | |
258 | 281 | | |
259 | 282 | | |
260 | 283 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
264 | 296 | | |
265 | 297 | | |
266 | 298 | | |
267 | | - | |
| 299 | + | |
268 | 300 | | |
269 | 301 | | |
270 | 302 | | |
| |||
0 commit comments