These are chat archives for sandialabs/toyplot

12th
Dec 2018
Timothy M. Shead
@tshead2
Dec 12 2018 17:20

Toyplot and Python 2

Gang:

Just a reminder that Python 2 will no longer be maintained after January 1, 2020 (https://pythonclock.org), and Toyplot is one of a large number of scientific projects that are ending support for Python 2 prior to that date (https://python3statement.org). So here’s what to expect over the next few weeks:

  • Before December 31st, 2018, a Toyplot 0.18.0 release of the current master. This will be the final Toyplot release with Python 2 support.
  • After January 1st, 2019, I will begin removing Python 2 portability-related code from master, and stop running Python 2 regression tests on Travis.
  • Toyplot 0.18.0 will have its own branch (our releases are normally just tagged).
  • Pull requests with bug fixes against the 0.18.0 branch will be accepted on a case-by-case basis, for an indeterminate amount of time.

FWIW, I’ve been doing virtually all of my Toyplot development on Python 3 for over a year, without complaint. You should consider doing the same with your work. It’s time. Don’t panic.

Cheers,
Tim

Timothy M. Shead
@tshead2
Dec 12 2018 18:10

@amoshyc asked:

Are there any chance to make Toyplot able to add raw svg element directly?

Sorry I overlooked this. We don’t support embedding directly, because it would complicate support for non-SVG backends. However, you can do this pretty easily as a postprocessing step. See the documentation for

… in either case, you can get the output as a DOM tree, suitable for further manipulation. The structure of the DOM is pretty clean, and there are CSS classes you can use to anchor queries.