Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw axis on top of graph #11

Open
ModProg opened this issue Jul 17, 2023 · 6 comments
Open

Draw axis on top of graph #11

ModProg opened this issue Jul 17, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@ModProg
Copy link
Contributor

ModProg commented Jul 17, 2023

grafik

I think the axes should be drawn on top

@ModProg
Copy link
Contributor Author

ModProg commented Jul 17, 2023

For overlay my workaround is:

#let overlay(plots, size) = {
  figure(caption: plots.at(0).caption, supplement: "Graph", kind: "plot", {
    set align(left + bottom)
    box(..convert_size(size), {
      // loop over every plots
      for (idx, plot) in plots.enumerate() {
        if idx == 0 {
          place(dx: 0pt, dy: -100%, box(width: 100%, height: 100%, plot.body.child.body.children.at(1)))
        } else {
          place(dx: 0pt, dy: -100%,box(width: 100%, height: 100%, plot.body.child.body.children.at(1)))
        }
      }
      place(dx: 0pt, dy: -100%, (box(width: 100%, height: 100%, plots.at(0).body.child.body.children.at(0))))
    })
  })
}

@Pegacraft Pegacraft added the enhancement New feature or request label Jul 25, 2023
@Pegacraft
Copy link
Owner

image
Drawing the axes over the data would cause issues with the helper lines. And this would be a pain to fix. But I could introduce an option to select, what a person prefers.

@ModProg
Copy link
Contributor Author

ModProg commented Jul 25, 2023

makes sense, would be good if one could separate the axis and helperlines i.e. render:

  1. Helper lines
  2. Plot
  3. Axis

@Pegacraft
Copy link
Owner

I will look into how bad this would get haha

@ModProg
Copy link
Contributor Author

ModProg commented Jul 25, 2023

No worries, my thesis is done, so it'll probably be a while till I find some motivation to work with typst again.

@Pegacraft
Copy link
Owner

Alright haha. (I hope you did end up using the package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants