Skip to content

Update how output of matplotlib is shown #2

@Cheukting

Description

@Cheukting

As Pyscirpt is in active development, the way how matplotlib result is handled changes. Need to:

  • use display() to show fig in Chapter2 exercise 1 and;
  • display(fig, target="output") for exercise 3

(see https://docs.pyscript.net/latest/reference/API/display.html?highlight=display)

Since display does not know how to replay already existing child properly (maybe worth reporting this issue to pyscript), we need to do a Element("output").clear() before display

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions