gorilla-repl icon indicating copy to clipboard operation
gorilla-repl copied to clipboard

compose fn does not count dimensions of any plot except first

Open yashaka opened this issue 9 years ago • 0 comments

The following code

(plot/compose 
  (plot/list-plot '((1 1) (2 2)) :joined true)
  (plot/list-plot '((2 2) (1 3)) :joined true :color "blue")
  (plot/list-plot '((1 3) (1 1)) :joined true :color "red"))

Will not paint everything above ((1 2) (2 2)) line. It will cut both ((2 2) (1 3)) and '((1 3) (1 1)) segments

The workaround exists:

(plot/compose 
  (plot/list-plot '((1 1) (2 3)))    ;; by providing additional "normalised" plot 
  (plot/list-plot '((1 1) (2 2)) :joined true)
  (plot/list-plot '((2 2) (1 3)) :joined true :color "blue")
  (plot/list-plot '((1 3) (1 1)) :joined true :color "red"))

But it's pretty uncomfortable to do this manually each time. I believe that compose should count dimensions of all plots passed to it.

yashaka avatar Aug 06 '16 14:08 yashaka