Hi,
When drawing map projection plots in viewports, do not call the "go mp_aspect" script. That command does a SET WINDOW command which resets your window and negates the "set viewport". Instead, either just skip any call to set the aspect ratio, if you want to keep the aspect ratio that is results from your viewport definitions, or use the script "mp_viewpot_aspect.jnl. For more details see this FAQ,
http://ferret.pmel.noaa.gov/Ferret/faq/map-projections-in- viewports
For drawing a single color key for all of the viewports on the page, it sounds as if you are doing things as described in this message, for instance,
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/ fu_2000/msg00226.html
Another method would be to draw just the colorbar first, in its own viewport, and then define the remaining viewports so that there is some space at the top where the colorbar lies. Try this:
! Define the common colorbar and levels for all plots
define symbol plot_qualifiers = /palette=blue_orange/levels=(-inf)(-20,20,4)(inf)
! Draw just the colorbar across the top of the page.
! use a RIBBON/VS command with /noaxes and /nolabels, specifying a horizontal colorbar
! The /hlim tells Ferret to set the horizontal range away from the data being plotted,
! guaranteeing a blank plot but with the correct colorbar.
! You could use a SHAKEY command on this plot to move the colorbar closer to the top.
set view full
ribbon/vs/hlim=5:10/nolab/noax/key=horiz($plot_ qualifiers) {1,1}, {0,0}, {0,0}
! Now define other viewports and draw the plots, using the ($plot_qualifiers) for the
! same levels and color palette throughout.
On 1/7/2018 3:27 PM, saurabh rathore wrote:
Dear Ferreters,
I figure out most of the issues such as
1) dots on the plot2) lat lon labels on the plot
the unresolved issues are
1) go multi_view command is not working2) ppl shakey command is not working
below is the modified script with the generated figure.
go multi_view 3,2,.43,0.070,0.052,.26,.064,0.058,a
use file1.ncuse file2.nc!!! file containing the variable !!!!!
!!! file containing the probability !!!!
let ohcg1=ohc_new[d=1]
let sig=pvalue[d=2]
let p=t[gt=ohcg1]
let q=ohcg1
go regresst
let nx = `pvalue,return=isize`
let ny = `pvalue,return=jsize`
let lon = x[gx=trend,i=1:`nx`:5] + 0*y[gy=trend,j=1:`ny`:5]
let lat = 0*x[gx=trend,i=1:`nx`:5] + y[gy=trend,j=1:`ny`:5]
let p95 = if pvalue[i=1:`nx`:5,j=1:`ny`:5] gt .95 then 1 else 0
LET xmin = 20
LET xmax = 380
LET ymin = -63
LET ymax = 63
LET xdel = 30
LET ydel = `126/6`
LET mid_lon = `xmin+(xmax-xmin)/2`
LET mid_lat = `ymin+(ymax-ymin)/2`
set mem/size=3000
SET REGION/X=19.5:380.5/Y=-63:63
set viewport a32
GO mp_mcbryde_fpp
SET GRID slope; GO mp_aspect
fill/NOLAB/NOAX/lev=(-inf)(-20,20,4)(inf)/pal=blue_orange slope*12, x_page, y_page
GO mp_graticule `xmin` `xmax` `xdel` `ymin` `ymax` `ydel` 1 0 !20 380 30 -63 63 `126/6` 1 0
GO mp_fland 120 gray overlay detailed
GO mp_land thick
GO mp_grid p95
plot/vs/OVER/sym=21/size=0.04/nolab/nokey mp_mask*x_page*p95, mp_mask*y_page*p95
go mp_label -8 -70 0 0 .11 "@cr 20E"
go mp_label 25 -70 0 0 .11 "@cr 50E"
go mp_label 55 -70 0 0 .11 "@cr 80E"
go mp_label 90 -70 0 0 .11 "@cr 110E"
go mp_label 125 -70 0 0 .11 "@cr 140E"
go mp_label 160 -70 0 0 .11 "@cr 170E"
go mp_label 195 -70 0 0 .11 "@cr 160W"
go mp_label 230 -70 0 0 .11 "@cr 130W"
go mp_label 265 -70 0 0 .11 "@cr 100W"
go mp_label 300 -70 0 0 .11 "@cr 70W"
go mp_label 335 -70 0 0 .11 "@cr 40W"
go mp_label 365 -70 0 0 .11 "@cr 10W"
go mp_label 400 -70 0 0 .11 "@cr 20E"
go mp_label -20 -65 0 0 .11 "@cr 63S"
go mp_label -2 -44 0 0 .11 "@cr 42S"
go mp_label 4 -22 0 0 .11 "@cr 21S"
go mp_label 9 0 0 0 .11 "@cr 0"
go mp_label 6.5 22 0 0 .11 "@cr 21N"
go mp_label 2 44 0 0 .11 "@cr 42N"
go mp_label -4 63 0 0 .11 "@cr 63N"
Now my main concern is to get the 6 plots in 3*2 format with the common horizontal shade key.
regards, saurabh
On Mon, Jan 8, 2018 at 7:26 AM, saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:
Dear Ferreters,
I am using the attached script but facing several issues
1) viewport command is not working2) ppl shakey command is not working3) how to put latitude and longitudes on the map
4) I want to put dots over the significant locations but it is showing error as **ERROR: dimensions improperly specified: unequal line lengths:
First _expression_ has 1260 points.
_expression_ 4 has 21 points:
"plot/vs/OVER/sym=21/size=0.02 p95*mp_mask, p95*mp_mask, x_page, y_page"
go multi_view 3,2,.43,0.070,0.052,.26,.064,0.058,a
use file1.nc!!! file containing the variable !!!!!
use file2.nc!!! file containing the probability !!!!
let ohcg1=ohc_new[d=1]
let sig=pvalue[d=2]
let p=t[gt=ohcg1]
let q=ohcg1
go regresst
let nx = `pvalue,return=isize`
let ny = `pvalue,return=jsize`
let lon = x[gx=trend,i=1:`nx`:6] + 0*y[gy=trend,j=1:`ny`:6]
let lat = 0*x[gx=trend,i=1:`nx`:6] + y[gy=trend,j=1:`ny`:6]
let p95 = if pvalue[i=1:`nx`:6,j=1:`ny`:6] gt .95 then 1 else 0
set mem/size=3000
set viewport a11
SET REGION/X=19.5:380.5/Y=-63:63
GO mp_mcbryde_fpp
SET GRID slope; GO mp_aspect
fill/NOLAB/NOAX/NOKEY/lev=(-inf)(-20,20,4)(inf)/pal=blue_ora nge slope*12, x_page, y_page
ppl shakey 1, 0, 0.14, , 6, 6, -2.8, 3.8, .29, .50
GO mp_graticule 20 380 30 -63 63 `126/6` 1
GO mp_fland 120 gray overlay detailed
GO mp_land thick
GO mp_grid p95
plot/vs/OVER/sym=21/size=0.02 p95*mp_mask, p95*mp_mask, x_page, y_page
Thanks in advance for valuable suggestions.
regards, saurabh
--
REGARDS
Saurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434
--
REGARDS
Saurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434