Skip to content

compose fn does not count dimensions of any plot except first #260

@yashaka

Description

@yashaka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions