How to exchange x-y axis and layout with another image?

All I want to achieve is something like this:

  1. the second plot should be drawn with x-y axes exchanged
  2. y axis of the two plots should be overlayed
    Can anyone help me about this? Thanks in advance.

In Makie (because you posted into the Slack channel as well) you would do the x-y change by just flipping the argument order of x and y.

Then you’d link the y limits with linkyaxes!.

The red lines are a bit more difficult, because you’d need to plot into the Figure scene and compute the end points given the axis projection. Is that also part of your requirements?

@jules I always find hard to grasp that part about plotting into the Figure scene, maybe it will be good to have something in the Makie docs, with one example drawing some lines between two axis. Just a suggestion.

Yeah it’s a good point. I think we should solidify an api around these axis / figure transformations because I still do them manually everytime.

1 Like