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 ... 12, 13, 14 ... 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: 243
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: 2816
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: 7924
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: 2816
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: 7924
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: 7924
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: 2816
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: 7924
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: 697
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 Visit poster's website
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

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

that sounds good Ken.
what options are provided with it .... line thickness ? line style ? line colour ? other ?
(I can't check it out as personal edition not released yet apparently Sad )
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

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

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


what's an 'equivalent standard module' ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
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: 2816
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
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

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

how long is it likely to be before 8.2 Personal is released ?
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

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

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 ?

Last edited by John-Silver on Sat Nov 04, 2017 12:29 pm; edited 1 time in total
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 -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3 ... 12, 13, 14 ... 26, 27, 28  Next
Page 13 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