typst / packages

Packages for Typst.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plotst having floating point issues (axis)

marcustut opened this issue · comments

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

Closing in favor of Pegacraft/typst-plotting#18. The issues tab in this repository is only intended for issues with the package management system itself.