Silverfrost Forums

Welcome to our forums

%pl [xaxis=<caption>,yaxis=<caption>]

8 Feb 2023 2:23 #29935

There is a minor issue I have just spotted with the relatively new %pl [xaxis=<caption>] and [yaxis=<caption>] options where <caption> is a single letter (which is of course generally not the case).

The code below demonstrates this.

  use clrwin
  parameter (n=11)
  real*8 :: x(n) = [-5,  -4,-3,-2,-1,0,1,2,3,4, 5]
  real*8 :: y(n) = [-25,-16,-9,-4,-1,0,1,4,9,16,25]
  y = y - 100
  x = x + 100
  call winop@('%pl[frame,colour=blue,width=2,symbol=5]')
  call winop@('%pl[Title='X and Y axis captions incorrectly positioned']')
  call winop@('%pl[xaxis='A',yaxis='F']')
  i = winio@('%pl[x_array,independent,n_graphs=1]',500,400,n,x,y)

  call winop@('%pl[frame,colour=blue,width=2,symbol=5]')
  call winop@('%pl[Title='X and Y axis captions incorrectly positioned']')
  call winop@('%pl[xaxis='A ',yaxis='F ']')
  i = winio@('%pl[x_array,independent,n_graphs=1]',500,400,n,x,y)

  call winop@('%pl[frame,colour=blue,width=2,symbol=5]')
  call winop@('%pl[Title='Correct position with leading space in caption string']')
  call winop@('%pl[xaxis=' A',yaxis=' F']')
  i = winio@('%pl[x_array,independent,n_graphs=1]',500,400,n,x,y)
  
  call winop@('%pl[frame,colour=blue,width=2,symbol=5]')
  call winop@('%pl[Title='Captions two or more characters long']')
  call winop@('%pl[xaxis='A1',yaxis='F(A1)']')
  i = winio@('%pl[x_array,independent,n_graphs=1]',500,400,n,x,y)
end
8 Feb 2023 3:50 #29936

Ken

I think that this is probably deliberate and may reflect what appears with the original SimplePlot but I will make a note to look at it.

Please login to reply.