Skip to content

chaquo/chaquopy-matplotlib

Repository files navigation

Chaquopy Matplotlib demo

This is the source code of the app demonstrated in my interview with Eric Decanini. It uses Chaquopy to include Python code and libraries in an Android app.

  • The top-level and module-level build.gradle files contain the Chaquopy configuration, including installing Matplotlib.
  • The MainActivity inputs two strings from text boxes and passes them to a Python function.
  • The Python code parses the strings into lists of numbers, and uses Matplotlib to plot them on a chart.
  • The Python function then returns the chart image as a byte array in PNG format, which the MainActivity displays in an ImageView.