I am working on migrating my on-premises asp.net app to azure app service. My app renders R plots as a PNG using R.net. I am packaging R software as a folder(not as installation) in my publish and updating R.net environment variables to use R libraries in that folder. This setup is working in an on-premises windows server:
While trying to render this in Azure app service using the same parameters as on-prem, it renders an error. The below specifies output at 300dpi:
If the output resolution is changed to 280dpi, the png image renders but is missing lots of legends and lines:
I tried setting type = "cario" for png device but not able to draw complete plot. Other things tried:
- Setting the output to a bitmap. Also renders a partial image, but different issues from the PNG. It renders the plot, but tiles of the image are missing, particularly on the right and bottom of the image
- Setting the output to a pdf. Renders a complete image, but not in the format we want (PNG)
Any suggestions on rendering R plots from azure app service are well appreciated.