NCAR / ncl

The NCAR Command Language (NCL) is a scripting language for the analysis and visualization of climate and weather data.

Home Page:http://www.ncl.ucar.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ways to maximize the viewport area of SVG outputs of gsn_csm_contour_map or remove the surrounding space.

RehanHossain opened this issue · comments

Is your feature request related to a problem? Please describe.
The gsnMaximize resource doesn't work on SVG graphical output if it is in landscape mode. I am not sure if it classifies as a bug or not so I am writing this as a Feature request.

Describe the solution you'd like
It would be great if the outputs can cover the maximum area of the viewport as is possible with setting res@gsnMaximize = True; for image files such as png.

Describe alternatives you've considered
I have tried multiple ways to get the images to cover the maximum region for viewport-

  1. Selecting the res@gsnMaximize = True; simply doesn't work for SVG or eps file as it does for image formats such as png
  2. Choosing pltType@wkOrientation = "landscape" couldn't rotate the map
  3. Varying pltType@wkPaperWidthF and pltType@wkPaperHeightF draws the map in even smaller region.
  4. Tried varing res@vpWidthF =1 and res@vpHeightF also without success
  5. Tried additional resources like resize_*.ncl codes from https://www.ncl.ucar.edu/Applications/resize.shtml still couldn't get result.

Additional context
If there was any way of passing The viewBox resources to the gsn_csm_contour_map we would greatly benefit.
Files for github feature request.zip

The Ideal Image.svg is the output that I want to obtain for reference. I would be obliged if anyone can help me find another workaround that I might have missed.

Finally I was able to readjust the Size of plot by passing negative values the resources @wkDeviceLowerX, @wkDeviceLowerY,..to the pltType variable. Btw noticed @gsnMaximize works fine in gsn_csm_contour plots but not on gsn_.. map plots. Anyway since the issue was resolved I am clossing this Thread. Although I am not sure if this was the Standard method or not.