replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - %pl and Simpleplot graphs
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 and Simpleplot graphs
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Oct 23, 2014 2:35 pm    Post subject: %pl and Simpleplot graphs Reply with quote

Dan,

I am moving our discussion about Simpleplot and %pl to a new topic as it seems to me more apropriate, considering the focus of the problems we have being discussing during the last weeks.....thus, taking your last comment from the previous topic:

Quote:
You know how much time i lost on the bugs of SPlot? Just today 3 hours full voice swearing (was getting exception violations on 10 years old code). And i thought i know all its pitfalls. This POS somehow i still don't understand is sensitive to the data it plots even if it is in the real*4 limits range. How to find the error in this case if source is not available and using debugger is not possible ? If author would at least cleaned the source and got the major bugs out then being eternal betatester of SP would not suck so much


I have to say that I had a different experience....I used Simpleplot with FTN77, FTN90 and FTN95 (both versions, i.e. Salford and Silverfrost) and I do not remember to have had a problem with exception violation....as you know, I practically don't use %pl except as [user_drawn], so that I code always direct calls to Simpleplot subroutines. I wonder if your problems are always with %pl or you found that also calls to Simpleplot gave you exception violations. I think it would be good for the discussion if you could share with us the bugs you found. As you know, I do not consider Simpleplot as a perfect graphical solution for FTN95, but is the only free-one that I found till now. I gave a look at DSLIN and did not find a way to use it with Clearwin, so it was out of discussion for me, and a couple of tests with Simdem did not gave me similar results as Clearwin+Simpleplot: it seemed that Simdem has its proper output, which is nice if you like it, but you cannot configure a Clearwin window as you want. That's the reason I am still with Simpleplot, with all the limitations it still has because is a ...uhmm...10 years old software?.

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Sat Oct 25, 2014 1:22 pm    Post subject: Reply with quote

Here is one more bug: i changed linewidth to 7, which is seen by very thick axis, but plot linewith did not increase. It sometimes changes up by one pixel and then get back
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Sat Oct 25, 2014 3:03 pm    Post subject: Reply with quote

It looks like you have called thckmg subroutine for the axes and not for the curves....sounds strange...I would like to see your code in order to check what seems to be wrong......

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Sun Oct 26, 2014 3:05 am    Post subject: Reply with quote

The source code is not extractable easily from the larger code. The called stuff before %pl is standard like in all examples above in older thread.
Code:
      CALL DIAGLV (0)
      CALL TEXTMN(sngl(SimplotCircEq_FontSize)) ! 0.35)
      CALL AXLBJS('*C','C')
      call thckmg('LINE',sngl(SimplotCircEq_lineWid)) ! 3
      call chset(iSimplotCircEq_FontCharset) ! -11)

   i=winio@('%pv%pl[x_axis="Time ",y_axis=Amplitude,&     
   &title="U(red, green-anal), U_A on load(orange), I(blue, black-anal)",&
   &colour=red, colour=blue, colour=green, colour=black, colour=#CC8800,X_ARRAY, N_GRAPHS=5]&',&
   &833,300,narr,timearr1,yarr1(1,1),yarr1(1,2),yarr1(1,3),yarr1(1,4),yarr1(1,5))
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Sun Oct 26, 2014 3:13 pm    Post subject: Reply with quote

please, check this code:
Code:
 Module SomeFun
 INCLUDE <windows.ins>
 real*8 :: TextSize=0.41
 integer:: LineWidth=1, iCharacterSetNo=-11, N=100,A=25
 Real*8  x(100), y(100), z(100), u(100), v(100), w(100)
 CONTAINS
 integer function RedrawS ()
 CALL DIAGLV (0)
 CALL TEXTMN(sngl(TextSize)) ! 45)
 CALL AXLBJS('*C','C')
 call thckmg('LINE', float(LineWidth))
 call chset(iCharacterSetNo)
 call simpleplot_redraw@
 RedrawS = 1
 End function
  End Module SomeFun
 Program Simple2
 use SomeFun
 do i=1,N;
 x(i)=i-1
 y(i)=A*sin(i/30.)**2;
 z(i)=A*sin(i/30.)**5;
 u(i)=A*sin(i/30.)**10;
 v(i)=A*cos(i/30.)**10;
 w(i)=A*sin(i/30.)**2 * cos(i/30.)**2;
 enddo
 i=winio@('%sy[3d_raised]&')
 i=winio@('%1tl%nd%nr&',16)
 i=winio@('%2.1ob[invisible,bottom_exit]&')
 i=winio@('Text   size   %ta%df%6^rf%ff&', 1d-2, TextSize, RedrawS)
 i=winio@('Line Width %ta%dd%6^rd%ff&', 1, LineWidth, RedrawS)
 i=winio@('%cb&')
 i=winio@('%ta Charset  (-12 to +26)%ta%dd%6^rd&', &
          1, iCharacterSetNo, RedrawS)
 i=winio@('%cb&')
 i=winio@('%ww%pv%pl[x_axis="Time [s]",y_axis=Amplitude,&     
    &title="U (red),    U_A (orange),     I (blue) ", &
    & colour=red, colour=blue, colour=green, colour=black, &
    &colour=#CC8800, X_ARRAY, N_GRAPHS=5]&',&
    & 833, 300, N, x, y, z, u, v, w)
 i=winio@('%ac[esc]%ff&', 'exit')
 i=winio@('%cn%^6bt[E&xit]','exit')
End Program


it tries to do what you say and in my case, I get that all the lines have the same thickness. In fact, when you use %pl instead of Simpleplot subroutines, you are not in control of the different lines: you just set the thickness of any line before entering in %pl, so that all lines, axes and curves should have the same properties.. I do not see with your partial code why you are getting different results. If the code above works for you, seems that the problem is not with Simpleplot.....

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Mon Oct 27, 2014 12:37 am    Post subject: Reply with quote

What was the trick in this code above? Quick look at this code tells that it is the same as in the other thread which I know that it works fine. But the one I report as buggy is essentially the same code, it has just more irrelevant stuff in modules to post here. Yet it glitches. Something interferes with not so robust and not polished by many users %pl. I actually suspect I was so far the only one "betatester" who used it from its start in 90-th Smile . Well, will try to extract the %pl code from larger one when have time and see what that gives.
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Mon Oct 27, 2014 12:55 am    Post subject: Reply with quote

there is no trick at all... Smile ...it's a short version of the previous ones as you noted.....I put it to show you that it was quite strange what you found with your code.....I use %pl as well, but only when the plots are quite simple and I do not require a lot of customisation......so you are not alone with %pl!....what I suspect is that you are using several %pl statements and likely before one of them you are setting the thickness of the lines and in the other one not.....but as you know, without the more or less complete code I cannot check that.....I know that you like a single command for plotting, but my advise is to use %pl, if you like it, as user_drawn and allow the customisation of the graphs by using direct calls to Simpleplot subroutines....

so, in the end, I do not find that it was a bug in Simpleplot, but something else in some part of your code.....

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Mon Oct 27, 2014 8:13 am    Post subject: Reply with quote

John, You could be right. Some bug adjusts linewidth wrong way

I extracted the buggy code, it is still pretty large, i am trying to shorten it, will post it soon if this is not my own error


Last edited by DanRRight on Mon Oct 27, 2014 8:30 am; edited 1 time in total
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Mon Oct 27, 2014 8:37 am    Post subject: Reply with quote

Well, the reason seems is different. Here is this @#$%^ bug in all its glory. I reproduced it on our regular test code.
It happens when Y value becomes negative. I changed only Y(i) function to allow it to be negative. When Y is always positive the linewidth is 7. When Y gets both positive and negative it switches to 1.


Code:

Module SomeFun
  INCLUDE <windows.ins>
  real*8 :: TextSize=0.41
  integer:: LineWidth=7, iCharacterSetNo=-11, N=100,A=25
  Real*8  x(100), y(100), z(100), u(100), v(100), w(100)
  CONTAINS
  integer function RedrawS ()
  CALL DIAGLV (0)
  CALL TEXTMN(sngl(TextSize)) ! 45)
  CALL AXLBJS('*C','C')
  call thckmg('LINE', float(LineWidth))
  call chset(iCharacterSetNo)
  call simpleplot_redraw@
  RedrawS = 1
  End function
   End Module SomeFun
  Program Simple2
  use SomeFun
  do i=1,N;
  x(i)=i-1
  y(i)=A*sin(i/30.);
  z(i)=A*sin(i/30.)**5;
  u(i)=A*sin(i/30.)**10;
  v(i)=A*cos(i/30.)**10;
  w(i)=A*sin(i/30.)**2 * cos(i/30.)**2;
  enddo
  i=winio@('%sy[3d_raised]&')
  i=winio@('%1tl%nd%nr&',16)
  i=winio@('%2.1ob[invisible,bottom_exit]&')
  i=winio@('Text   size   %ta%df%6^rf%ff&', 1d-2, TextSize, RedrawS)
  i=winio@('Line Width %ta%dd%6^rd%ff&', 1, LineWidth, RedrawS)
  i=winio@('%cb&')
  i=winio@('%ta Charset  (-12 to +26)%ta%dd%6^rd&', &
           1, iCharacterSetNo, RedrawS)
  i=winio@('%cb&')
  i=winio@('%ww%pv%pl[x_axis="Time [s]",y_axis=Amplitude,&     
     &title="U (red),    U_A (orange),     I (blue) ", &
     & colour=red, colour=blue, colour=green, colour=black, &
     &colour=#CC8800, X_ARRAY, N_GRAPHS=5]&',&
     & 833, 300, N, x, y, z, u, v, w)
  i=winio@('%ac[esc]%ff&', 'exit')
  i=winio@('%cn%^6bt[E&xit]','exit')
 End Program
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Mon Oct 27, 2014 1:55 pm    Post subject: Reply with quote

as far as I remember (I do not have my computer with me at this moment) the "default" value for lines thickness in Simpleplot is 1, so that it seems that %pl does not like negative data in the curves so much and resets the value of the curves line to 1. Why?....well seems that we can only say that Simpleplot is "not guilty" as, as John said, it apparently comes from some kind of bug in %pl, and that's a problem for Silverfrost not for "BUSS".
John: have you tested the problem with direct calls to Simpleplot using the spwin module or the %pl[user_drawn] way?......I wonder if it also happens with %pl as a user drawn window.....

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Wed Oct 29, 2014 4:34 pm    Post subject: Reply with quote

Here is another damn problem with %pl. Data sensitivity. The Y values less then around 1d-50 could crash %pl. We all know it is confusing that Simpleplot is real*4 while %pl is real*8 so i do not get in this mousetrap again and all small values are substituted with something around 1e-30. Still i get this crash inside the Simpleplot as you can see from the debugger information. So far I tried many thing but my old large code crashes in some specific initial data parameter space. Will continue debug when have spare time, i lost too much for now for this @#$%.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
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