Skip to content

Error when annotating without plotting data #157

@DegrangeM

Description

@DegrangeM

You get the error cannot compare float and none if you try to use annotate without adding data before.

The code bellow trigger the error

  #cetz.canvas({
    import cetz.draw: *
    import cetz-plot: *
    plot.plot(size:(3,3), {
        plot.annotate({
          line((1,2),(3,4))
        })
    })
  })

while this one doesn't

  #cetz.canvas({
    import cetz.draw: *
    import cetz-plot: *
    plot.plot(size:(3,3), {
        plot.add(((0,0),(0,0)))
        plot.annotate({
          line((1,2),(3,4))
        })
    })
  })

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions