Forum Index
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 

Problems with %pl
Goto page Previous  1, 2, 3, 4
Post new topic   Reply to topic Forum Index -> Support
View previous topic :: View next topic  
Author Message
Site Admin

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

PostPosted: Thu Apr 09, 2020 10:15 am    Post subject: Reply with quote

I have reviewed this thread and here is a sample program that illustrates how to draw multiple titles at specified points on the graph.

      MODULE mydata
        USE clrwin
      INTEGER FUNCTION legend()
        DOUBLE PRECISION xpix,ypix
        IF(clearwin_string@("CALLBACK_REASON") == "PLOT_ADJUST") THEN
          ir = get_plot_point@(400.0d0,1.4d0,xpix,ypix)
          CALL italic_font@(0); CALL bold_font@(1); CALL scale_font@(1.1d0)
          CALL draw_charactersD@("Sample plot", xpix, ypix, RGB@(0,0,128))
          ! **** More titles can go here ****
        legend = 2
      END FUNCTION legend
      END MODULE mydata
      PROGRAM main
      USE mydata
      INTEGER i,x
      DOUBLE PRECISION p1,p2,p3,z
      DO i=1,n
        y(i) = z
      i=winio@('%ww[no_border]%ca[Damped wave]%pv&')
      i=winio@('%ts&', 1.1d0)
      CALL winop@("%pl[native,gridlines]")
      CALL winop@("%pl[x_axis=Time(Milliseconds)]")
      CALL winop@("%pl[y_axis=Amplitude]")
      CALL winop@("%pl[smoothing=4]")
Back to top
View user's profile Send private message AIM Address

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

PostPosted: Thu Apr 09, 2020 8:45 pm    Post subject: Reply with quote

thanks Paul,

which problem raised in the post does this specifically fix then?

I'd suggest that for the the example is a little misleading to say 'multiple titles', it should maybe be better expressed as 'how the label multiple points on a graph ' ?

A method similar to this method can of course be adapted for say legends, axes titles, etc ..... , PROVIDING it's possible to know the precise position available to put them WITHOUT overlaying on existing tics and labels labels , titles, etc ....

This was the subject of a seperate post of mine some time ago (which dan referred to in a comment he made in november on this thread)

That post can be found here:

Also for legends it is often desired to put legends OUTSIDE a graphic area, especially when there are several curves present which utilise a large proportion of the graph 'box' and/or other 'component onject' of the overall plot
To do that requires again knowledge of things like margins, tics, axis labels parameters (to be able to pinpoint where to locate the user-defined DRAW_CHaracters@ text.

is it possible to provide examples for those scenarios .... if it's possible to do it that is ?

(I'm thinking here of an automated wat to do it without a trial-and-error approach for individual plots (whose axes, margins, acales and tic-labels might change as a function of the dataset to be plotted, thus requiring a program change each time !)
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4
Page 4 of 4

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