two different axes

From: ahmed lasheen <ahmed4kernel_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 17 2011 - 02:13:41 MST

Hello,
i am trying to plot two ASCII files on the same window , each file has two
column data.
due to the difference of the dimension in two files ,i have used the
interface gsn_csm_x2y2
but i still have the following error
* (0) gsn_csm_xy: Fatal: X and Y must have the same dimensions sizes, or one
must be one-dimensional and both have the same rightmost dimension.*
*warning:TransInitialize: Zero Y coordinate span: defaulting:[errno=1104]*
*(0) gsn_csm_xy: Fatal: X and Y must have the same dimensions sizes, or one
must be one-dimensional and both have the same rightmost dimension.*
*warning:TransInitialize: Zero Y coordinate span: defaulting:[errno=1104]*

here is the ncl file

;*************************************************
; gsn_xy_1.ncl
;*****************************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

;*****************************************************************
begin
  data_jacopi = asciiread("jacopi.error",(/584,2/),"float")
  data_gauss = asciiread("gauss.error",(/301,2/),"float")
  x_jacopi = data_jacopi(:,0)
  y_jacopi = data_jacopi(:,1)
  x_gauss = data_gauss(:,0)
  y_gauss = data_gauss(:,1)

;**************************************************
; create plot
;**************************************************
  res1 = True ; plot mods desired
  res1@trXMinF = min(x_jacopi)
  res1@trXMaxF = max(x_jacopi)
  res1@trYMinF = min(y_jacopi)
  res1@trYMaxF = min(y_jacopi)
  res1@tiMainString = "relaxation error" ; title
  res1@tiYAxisString = "error" ; y axis title
  res1@tiXAxisString = "number of iteraion" ; X axis title
  res1@xyLineColor = (/"red"/) ; control the line colors.

  res2 = True
  res2@trXMinF = min(x_gauss)
  res2@trXMaxF = max(x_gauss)
  res2@trYMinF = min(y_gauss)
  res2@trYMaxF = min(y_gauss)

   wks = gsn_open_wks("x11","gsn_xy") ; Open an ps workstation.
; plot = gsn_csm_xy(wks,x_jacopi,y_jacopi,res) ; Draw an XY plot with 1
curve.
   plot = gsn_csm_x2y2(wks,x_jacopi,y_jacopi,x_gauss,y_gauss,res1,res2)

end
~
i have attached the data files
thanks in advance

-- 
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt
===============



_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Thu Feb 17 02:14:30 2011

This archive was generated by hypermail 2.1.8 : Thu Feb 17 2011 - 22:00:17 MST