Skip to content

Tag: matplotlib

Python from RMarkdown – Matplotlib problems

I’m trying to use reticulate to run some simple Python code in an RMarkdown document. I’ve found that if Matplotlib is in the conda environment, I get errors when trying to run a python code chunk, but I can run Python from R directly. Here’s a simple example of what I see: My first thought …

How to get data from matplotlib bar chart

How does one retrieve data programmatically from a matplotlib bar chart? I can do it for a matplotlib line chart as follows, so maybe I’m fairly close: for a bar chart, however, there are no lines, and I’m unclear what the equivalent object is: FWIW, here are a couple of related postings (that don…