AnsweredAssumed Answered

Matplotlib Resize Image

Question asked by lloydbronn on Jun 26, 2017
Latest reply on Jun 27, 2017 by CDow-esristaff

I have a Python geoprocessing tool that creates a chart from a click on our website. I'm trying to put our company's logo in the chart, but it's a little too big and it's blocking some of the X axis labels. I've tried physically resizing the .png in Windows and linking to the smaller version. No matter which one I use, it's displayed the same size in the chart. I haven't been able to find a clear solution online. Here is my code:


fig, ax1 = plt.subplots(figsize=(12,8),facecolor='w')

logo = plt.imread(get_sample_data("our logo"))
axim = fig.add_axes([0.01,0.01,0.2,0.14], anchor='SW')
axim.imshow(logo, aspect='auto')