Knowledge Base Article

Resizing And Scaling Charts In R Python

You have you have an R or Python chart but it renders very small. How can you resize it? 
The Functions to Resize the Canvas
These functions will set the max size that the image is capable of rendering. 
For R, you can append the following line before the periscope.image() function
png(500,500)  
For Python, if you're using matplotlib, you can try something like the following (which will set the figure canvas to 5 x 5 inches). For more information on sizing the figure object, here's a link to the documentation.
plt.figure(figsize=(5,5)) 
or
fig.set_size_inches(5,5)
Font Sizes and Caveats
If you're using a library like R's wordcloud library, you will need to use the scale parameter to adjust the sizing of the fonts since png() will only change the canvas but not the font scaling of the word clouds. 
Updated 02-16-2024
No CommentsBe the first to comment