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

plotst having floating point issues (axis) #18

Open
marcustut opened this issue Nov 23, 2023 · 0 comments
Open

plotst having floating point issues (axis) #18

marcustut opened this issue Nov 23, 2023 · 0 comments

Comments

@marcustut
Copy link

Same issue reported at typst/packages#256

I would expect to see exact 0.1 - 1.0, or we have a way to round off these floating points?

#let dtree = (
  (2, 0.482),
  (4, 0.527),
  (6, 0.556),
  (8, 0.572),
  (10, 0.573),
  (12, 0.522),
  (14, 0.522),
  (16, 0.522),
  (18, 0.522),
  (20, 0.522)
)

#let x_axis = axis(min: 0, max: 22, step: 2, location: "bottom")
#let y_axis = axis(min: 0, max: 1, step:  0.1, location: "left")

#let pl_graph = plot(data: dtree, axes: (x_axis, y_axis))
#graph_plot(pl_graph, (100%, 25%), stroke: blue)
Screenshot 2023-11-23 at 9 50 33 AM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant