replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - %pl problem
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%pl problem

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Kenneth_Smith



Joined: 18 May 2012
Posts: 828
Location: Lanarkshire, Scotland.

PostPosted: Fri Jul 18, 2025 1:50 pm    Post subject: %pl problem Reply with quote

Paul,

One for you to look at time permitting.

Sometimes it can be useful to highlight a particular point on an curve which is plotted using %pl. This can be achieved in most cases (without resorting to annotations via the callback) by adding a second �curve� with just one point and using an appropriate symbol.

However, if the y coordinate of that particular point is zero, the symbol is not drawn. The program below demonstrates this.

Code:
winapp
module demo_missing_symbol
use clrwin
implicit none
real*8 :: x1(1), y1(1), x2(21), y2(21)
integer :: k, kmax = 21
character(len=50) :: message = ''
contains
integer function iface()
integer :: iw, i

  x2(1:kmax) = -10.d0 + dble([(i - 1, i = 1, kmax)])
  y2(1:kmax) = x2(1:kmax)**2 - 49.d0

  k = 1
  x1(1) = x2(k)
  y1(1) = y2(k)
 
  iw = winio@('%mn[Exit]&','exit')
  iw = winio@('The position of the blue symbol is changed by pressing the button%nl&')
  iw = winio@('Press the button and observe the resulting plot as the symbol follows the quadratic.%nl&')
  iw = winio@('%2.1ob[invisible]&')
  call winop@('%pl[native,n_graphs=2,x_array,independent,width=3,margin=50,axes_pen=3]')
  call winop@('%pl[colour=red,symbol=0,symbol_size=12,link=curves]')
  call winop@('%pl[colour=blue,symbol=6,symbol_size=12,link=none]')
  iw = winio@('%pl&',800,600,[kmax,1],x2,y2,x1,y1)
  iw = winio@('%ff%tc[blue]%`rs&',message)
  iw = winio@('%cb&')
  iw = winio@('%^bn[Next]&',next_cb)
  iw = winio@('%2nlX = %`rf%nlY = %`rf&',x1(1),y1(1))
  iw = winio@('%cb&')
  iw = winio@('')
  iface = 1
end function iface

integer function next_cb()
integer :: iw
  k = mod(k, kmax) + 1
  x1(1) = x2(k)
  y1(1) = y2(k)
  message = ''
  if (x1(1) .eq. 0.d0) message = 'X coordinate of blue symbol is exactly zero.'
  if (y1(1) .eq. 0.d0) message = 'Y coordinate of blue symbol is exactly zero.'
  call window_update@(message)
  call window_update@(x1(1))
  call window_update@(y1(1))
  call simpleplot_redraw@()
  next_cb = 2
end function next_cb

end module demo_missing_symbol

program p
use demo_missing_symbol
i = iface()
end program p
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8233
Location: Salford, UK

PostPosted: Mon Jul 21, 2025 11:33 am    Post subject: Reply with quote

Ken

Thanks for the feedback. I will take a look.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8233
Location: Salford, UK

PostPosted: Mon Jul 21, 2025 5:26 pm    Post subject: Reply with quote

This failure has now been fixed for the next release of the DLLs.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group