File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 417
417
fn : ptx => {
418
418
for plot in ptx . plots {
419
419
for proj in plot . projections {
420
- if axes . all (name => proj . axes . contains (name )) {
421
- // FIXME: Broken
420
+ let axis-names = proj . axes . map (ax => ax . name )
421
+ if axes . all (name => axis-names . contains (name )) {
422
+ let position = position . enumerate (). map (((i , v )) => {
423
+ return if v == " min" {
424
+ proj . axes . at (i ). min
425
+ } else if v == " max" {
426
+ proj . axes . at (i ). max
427
+ } else {
428
+ v
429
+ }
430
+ })
422
431
let pt = (proj . transform )(position ). first ()
423
432
ptx . anchors . push ((name , pt ))
424
433
}
Original file line number Diff line number Diff line change 167
167
plot . add (circle-data , axes : (" x" , " yt" ), style : (stroke : blue ))
168
168
plot . add (circle-data , axes : (" x" , " yb" ), style : (stroke : yellow ))
169
169
})
170
- }),))
170
+ })
171
171
172
172
/* Anchors */
173
173
# test-case ({
218
218
})
219
219
220
220
// Test plot with anchors only
221
- /*
222
221
# test-case ({
223
222
import draw : *
224
223
You can’t perform that action at this time.
0 commit comments