Problem rendering R Plots output to png device in azure app service

94 Views Asked by At

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: enter image description here 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: Exception when rendering at dpi 300

If the output resolution is changed to 280dpi, the png image renders but is missing lots of legends and lines: Partial png render when using output dpi 280

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 Bitmap Rendering
  • Setting the output to a pdf. Renders a complete image, but not in the format we want (PNG) PDF rendering

Any suggestions on rendering R plots from azure app service are well appreciated.

0

There are 0 best solutions below