replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Native %pl
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 

Native %pl
Goto page Previous  1, 2, 3 ... 9, 10, 11 ... 26, 27, 28  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
silicondale



Joined: 15 Mar 2007
Posts: 252
Location: Matlock, Derbyshire, UK

PostPosted: Mon Oct 30, 2017 12:00 pm    Post subject: Reply with quote

Paul - and all - seems to be a flurry of activity today! Thanks for the news about [stacked].

Yes, a TYPE array could help a lot - though not clear to me how you can code symbol type, size, and colour into a single array.

Is there any documentation of all the latest features and options that you've added recently? Or will that come with the next release?
Back to top
View user's profile Send private message Visit poster's website
DanRRight



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

PostPosted: Tue Oct 31, 2017 5:30 pm    Post subject: Reply with quote

Anyone has an idea how to do clear screen to wipe out previously made plot in native %PL like in the last example in this thread? If use %gr method instead of %pl the clear_screen@ works OK.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Oct 31, 2017 5:50 pm    Post subject: Reply with quote

There may be a way to use clear_screen@ with %pl. If not then this works...

Code:
      WINAPP
      MODULE mydata
        USE clrwin
        INTEGER,PARAMETER::n=1000,link_none=0,link_lines=1,link_curves=2
        INTEGER,PARAMETER::all_graphs=0,graph1=0
        LOGICAL shown
        DOUBLE PRECISION y(n)
      CONTAINS
      INTEGER FUNCTION show()
        INTEGER errstate
        errstate = change_plot_int@(0,"link",graph1,link_curves)
        if(errstate /= 0) print*, clearwin_string@("ERROR_REPORT")
        errstate = change_plot_int@(0,"colour",graph1,RGB@(255,0,0))
        errstate = change_plot_dbl@(0,"y_max",all_graphs,1.5d0)
        shown = .true.
        CALL simpleplot_redraw@()
        show = 2
      END FUNCTION show
      INTEGER FUNCTION clear()
        INTEGER errstate
        errstate = change_plot_int@(0,"link",graph1,link_none)
        shown = .false.
        CALL simpleplot_redraw@()
        clear = 2
      END FUNCTION clear
      INTEGER FUNCTION legend()
        IF(shown) THEN
          CALL draw_characters@("Legend:..", 300, 100, 0)
          CALL draw_line_between@(300,120,360,120,RGB@(0,0,255))
        ENDIF
        legend = 2
      END FUNCTION legend
      END MODULE mydata
     
      PROGRAM main
      USE mydata
      INTEGER i,x
      DOUBLE PRECISION p1,p2,p3,z
      !read*,i
      p1=1.5d0
      p2=150.0d0
      p3=15d0
      x=0
      DO i=1,n
        z=p1*sin(x/p3)*exp(-x/p2)
        !print*, i-1,x,z
        y(i) = z
        x=x+1
      ENDDO
      shown = .false.
      i=winio@('%ww[no_border]%ca[Damped wave]%pv&')
      i=winio@('%mn[Edit[Show, Clear]]&', show, clear)
      i=winio@('%fn[Tahoma]&')
      i=winio@('%ts&', 1.1d0)
      i=winio@('%tc&',rgb@(0,0,80))
      i=winio@('%it&')
      i=winio@('%`bg&',rgb@(230,255,225))
      CALL winop@("%pl[native,gridlines]")
      CALL winop@('%pl[title="Sample plot"]')
      CALL winop@("%pl[x_axis=Time(Milliseconds)]")
      CALL winop@("%pl[y_axis=Amplitude]")
      CALL winop@("%pl[smoothing=4]") ! anti-aliasing
      CALL winop@("%pl[link=none]")   ! delay drawing
      !CALL winop@("%pl[scale=log_linear]")
      i=winio@("%^pl",500,400,n,0.0d0,1.0d0,y,legend)
      END


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



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

PostPosted: Wed Nov 01, 2017 3:08 pm    Post subject: Reply with quote

Thanks, Paul,

1) this native %pl-specific approach works

� � � � errstate = change_plot_int@(0,"link",graph1,link_none)
� � � � CALL simpleplot_redraw@()

but just the clear_screen@ does not

2) Also, while draw_ellipse@ works the draw_polygon@ seems does not with the /64
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 01, 2017 3:37 pm    Post subject: Reply with quote

Dan

I will take a look at clear_screen@

I can't find draw_polygon@. There is draw_polyline@.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 01, 2017 4:27 pm    Post subject: Reply with quote

clear_screen@ is not working with the native %pl and it's not obvious why.
I will make a note of this.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Wed Nov 01, 2017 6:02 pm    Post subject: Reply with quote

Paul, Sorry, I gave wrong name

The draw_rectangle@ and draw_filled_rectangle@ seems worked before in 32 bits but now do not
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Nov 02, 2017 8:51 am    Post subject: Reply with quote

Dan

You need to include CLEARWIN.INS for these routines or use the equivalent standard module.
Back to top
View user's profile Send private message AIM Address
Kenneth_Smith



Joined: 18 May 2012
Posts: 816
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Thu Nov 02, 2017 6:02 pm    Post subject: Reply with quote

While it has not found its way into the enhancement file or the help file, the new %pl option in FTN95 version 8.20
Code:
call winop@("%pl[gridlines]")

works just fine for me. Thanks Paul & Co, this makes the output from %pl look so much better.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Nov 04, 2017 11:21 am    Post subject: Reply with quote

John

There are no options with [grid_lines]. It's just one shade of grey and a single pixel width.

The alternative to "INCLUDE <clearwin.ins>" is "USE clrwin".
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Sat Nov 04, 2017 11:37 am    Post subject: Reply with quote

PaulLaidler wrote:
Dan

You need to include CLEARWIN.INS for these routines or use the equivalent standard module.


Paul,

After installing latest 8.20
1) Unfortunately "include <clearwin.ins>" still does not work with 8.20, giving the error
Code:
Run-time Error
 *** Error   29, Call to missing routine : _MODSURFPLOTDEMO!RGB# at 0x00401271.


 00401000 MODSURFPLOTDEMO!CB_SURFPLOT_PLOTTING [+0276] [recur=  1]

 004013b0 main [+03a9]


see mine or John's latest codes from page 12 of this thread

2) But that was an unimportant bug probably, if nothing else was influenced we can live without rectangles. But clearly it's time to fix this single line fortran code which with the new beautiful gridlines just cries with its hell amount of bugs per line of code which need to be fixed. I see 5 bugs and defects. Who sees more?

Code:
use clrwin
parameter (N=5)
real*8 :: x(5) = (/1E1, 1E2,  1E3,   1E4,  1E5/)
real*8 :: Y(5) = (/2.2, 66., 3333., 1111., 777./)


i=winio@('%pv%pl[native,framed,gridlines,x_array,y_axis="Y_year",scale=log_log,N_GRAPHS=1]%ff%cn%bt[OK]%es',625,500,n,X,Y) 

end



3) Linear scale numbering also sometimes explodes in unimaginable insanity
I stretched the Surfplot on full screen of my 4k monitor. The code is the one we with John discussed on Page12 but changed tiny bit so that the plotted X data maximum is 9 and Y is 80. When posting I zoomed down image to the smaller size to see it in this forum but the problem or two with X axis numbering are clear.


Last edited by DanRRight on Sat Nov 04, 2017 2:36 pm; edited 12 times in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Nov 04, 2017 12:11 pm    Post subject: Reply with quote

John: I don't have a date for the release of the personal edition 8.2.

Dan: The linker can't find the RGB@ in the module MODSURFPLOTDEMO. It is within that module or CB_SURFPLOT_PLOTTING that you need to say where RGB@ is to be found. As to the 5 bugs, I guess that you want me to locate the code and identify the "bugs" in the output for myself.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Sat Nov 04, 2017 12:44 pm    Post subject: Reply with quote

Paul,

I am not sure what RGB@ is implemented as. I thought it would be an in-line or intrinsic function, but if I use the following, I get errors.
INTEGER,PARAMETER :: red = rgb@(255,0,0)
INTEGER,PARAMETER :: green = rgb@(0,255,0)
INTEGER,PARAMETER :: blue = rgb@(0,0,255)

Could this be allowed ?

Also, why "The linker can't find the RGB@"

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



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

PostPosted: Sat Nov 04, 2017 12:50 pm    Post subject: Re: Reply with quote

John-Silver wrote:
Dan, just realised in the plot at the top of p. 12 the last label on X-axis (60) w�should be 600 ! I think reading what you wrote that was done with simpleplot %pl right ?


John,
Yes, this was bug with older Simpleplot %pl. The hack fix for that is simple: just take last X numbers not 599 or 600 but 601 or 610 with x_max=610 if it exists (I forgot if x_max exists for X axis, for the Y axis the y_max definitely exist) or with just adding fake number to the data at the end of X-Y array

With my single line example I found one minor problem more. But it pushed me to lose some time in photoshop for a dozen of plots

Paul,
Sorry, I did not understand both your answer and question. In the code on page 12 the offending line "include <clearwin.ins>" is marked as causing problems. And JohnCampbell confirmed this

As to question about 5 bugs the code is there and John-Silver named almost all of defects (I thought may be I am blinded with devilry Smile so I asked others to confirm if they also see the bugs and defects)


Last edited by DanRRight on Sat Nov 04, 2017 1:06 pm; edited 2 times in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Nov 04, 2017 2:29 pm    Post subject: Reply with quote

John Campbell

RGB@ is implemented in salflibc.dll and clearwin64.dll so you won't be able to use it in an initialisation statement.

I normally just declare it as

INTEGER,EXTERNAL::RGB@
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
Goto page Previous  1, 2, 3 ... 9, 10, 11 ... 26, 27, 28  Next
Page 10 of 28

 
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