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 

Inconsistencies at drawing with %pl

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
FK_GER



Joined: 26 Oct 2017
Posts: 24
Location: University of Kassel,Germany

PostPosted: Sat Mar 17, 2018 5:38 pm    Post subject: Inconsistencies at drawing with %pl Reply with quote

I've written the following code, which draws in principle the wished graph.
All used variables and expressions are declared in the correct manner.

Code:
! Opening MDI-window     07.03.18       
      i=winio@('%sp&',winx,winy)
      i=winio@('%pv%`fr&',winb,winh)
      i=winio@('%ca[cross section and concrete behaviour]&')
      i=winio@('%lw[owned]',ctrl)
!c---Display a window containing the graph.
      iw0=winio@('%sp&',plox,ployo)
      iw0=winio@('%pv%aw&',ctrl)
      iw0=winio@('%ww[no_border]&')
      iw0=winio@('%`bg[white]&')
      iw0=winio@('%ca[concrete behaviour acc. to DIN EN 1992]%pv&')
      CALL winop@("%pl[title='for ULS: parabola-rectangle with f_cd']")
      CALL winop@("%pl[y_min=0.,y_max=1.]")
      CALL winop@("%pl[x_min=0.,x_max=3.5]")
      CALL winop@("%pl[x_axis=Verzerrung]")
      CALL winop@("%pl[y_axis=Spannung]")
      CALL winop@("%pl[dx=0.5,dy=0.1]")
      CALL winop@("%pl[n_graphs=2]")
      CALL winop@("%pl[width=2,width=2]")
      CALL winop@("%pl[pen_style=0,pen_style=2]")
      CALL winop@("%pl[link=curves,link=curves]")
      CALL winop@("%pl[colour=red,colour=blue]")
      CALL winop@("%pl[symbol_size=2,symbol_size=2]")
      CALL winop@("%pl[symbol=0,symbol=11]")
!C first variation
      CALL winop@("%pl[x_array]")
      iw0=winio@('%pl',plopix,plopiy, &
        ist,xData(1:ist,1),yData(1:ist,1),yData(1:ist,2))

But there are some inconsistencies:
x-axis-label is written at the right end of x-axis (xmax)
y-axis-label is centered at the y-axis
Why that?
It would be fine, when x-axis-label is also centered!


Code:
!C second variation
      CALL winop@("%pl[x_array,x_array]")
      CALL winop@("%pl[independent,independent]")
      iw0=winio@('%pl',plopix,plopiy, &
        ist,xData(1:ist,1),yData(1:ist,1),xData(1:ist,2),yData(1:ist,2))


Both variations should draw the identical graph.
But there are more inconsistencies:
x-axis-label is written at the right end of x-axis (xmax)
y-axis-label is written at the upper end of y-axis (ymax)
At the blue(second) curve (...,2) a line is drawn from the last data-point (xmax,ymax) to the origin! Why that?? The data for the first and second variation is the very same.

Has anybody an idea to correct these inconsistencies.

At last, I'd like to have a grid at the graph. What is to do?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Mar 17, 2018 6:25 pm    Post subject: Reply with quote

The native %pl is still a work in progress and it is quite possible that a number of these issues have been fixed in ClearWin+ for the next release.
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 177
Location: Glasgow, Scotland.

PostPosted: Sat Mar 17, 2018 10:11 pm    Post subject: Reply with quote

Hi FK,
There are been a fair bit of discussion of these issues over the past year.
For now, the best way to place you axis labels is via a call back function attached to the %pl using draw_characters@
For grid lines use:

Code:
call winop@('%pl[gridlines])


The grid lines option became available in release 8.2

I would use link=lines rather than link=curves, the smoothing algorithm (spline or poly?) does seem to have problems in some cases.

Ken
Back to top
View user's profile Send private message Visit poster's website
FK_GER



Joined: 26 Oct 2017
Posts: 24
Location: University of Kassel,Germany

PostPosted: Sun Mar 18, 2018 7:00 pm    Post subject: Reply with quote

At first I've tried "link=lines". But in this case the data points are linked with parabolic curves !!! I was very surprised. Therefore I've tested "link=curves" and must realize, that the points are linked with a straight line, as desired. Here is another problem at %pl. Ken also mentions problems with the "smoothing".

And here a further example as aforesaid:
Code:
! Opening MDI-window     07.03.18       
      i=winio@('%sp&',winx,winy)
      i=winio@('%pv%`fr&',winb,winh)
      i=winio@('%ca[cross section and concrete behaviour]&')
      i=winio@('%lw[owned]',ctrl)
!  Drawing a simple XY Graph
      iw0=winio@('%sp&',plox,ployo)
      iw0=winio@('%pv%aw&',ctrl0)
      iw0=winio@('%ww[no_border]&')
      iw0=winio@('%`bg[white]&')
      iw0=winio@('%ca[cross section and reinforcements]&')
      CALL winop@("%pl[title='concrete cross section']")
      CALL winop@("%pl[y_min=0.,y_max=2.]")
      CALL winop@("%pl[x_min=-0.5,x_max=+0.5]")
      CALL winop@("%pl[x_axis=cross section width]")
      CALL winop@("%pl[y_axis=cross section height]")
      CALL winop@("%pl[dx=0.1,dy=0.1]")
      CALL winop@("%pl[n_graphs=3]")
      CALL winop@("%pl[width=2,width=2,width=2]")
      CALL winop@("%pl[pen_style=0,pen_style=0,pen_style=0]")
      CALL winop@("%pl[link=curves,link=none,link=none]")
      CALL winop@("%pl[Colour=black,colour=blue,colour=red]")
      CALL winop@("%pl[symbol_size=4,symbol_size=4,symbol_size=4]")
      CALL winop@("%pl[symbol=1,symbol=11,symbol=7]")
      CALL winop@("%pl[x_array,x_array,x_array]")
      CALL winop@("%pl[independent,independent,independent]")
      iw0=winio@('%pl',plopix,plopiy, &
          IPLD,xData(1:ipld,1),yData(1:ipld,1),xData(1:ipld,2),yData(1:ipld,2),xData(1:ipld,3),yData(1:ipld,3))

Description: A concrete cross section with two reinforcements (prestressed and not prestressed) is to be drawn. The corner points of the concrete (..,1) are to be linked with a solid line; for the reinforcements (..,2) (..,3) only the points are to be marked. But what happens: only the first data (...,1) is drawn!
At the example before (second variation) the second data (...,2) is drawn, at least. Why here the second and the third data is not drawn?
By the way, for a complete presentation of the cross section data there are three further data ranges to be drawn, total n_graphs=6. How this is able to work? Already the graph of two data-ranges creates problems!

Some further questions:
x-axis runs from -0.5 to +0.5; y-axis is drawn at origin (0,0). This causes, that the y-axis is drawn centered through the shown section.
Is possible to move the y-axis at point x=xmin?

pen_style=0 -> solid line; pen_style=2 -> dashed line; (found in examples)
pen_style=1 -> ??? pen_style=3 -> ??? pen_style=4 -> ??? ...

Is it possible to replace the 'clear' text and numbers with variables.
e.g. xname='cross section width'
CALL winop@("%pl[x_axis=xname]")
or
miny=0. maxy=2.
CALL winop@("%pl[y_min=miny,y_max=maxy]")
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1972
Location: Sydney

PostPosted: Mon Mar 19, 2018 3:24 am    Post subject: Reply with quote

Is it possible to link a small working code example ? Say with a dropbox link or similar.
Reporting the version of FTN95 and also the .dll's you are using is also important for understanding the version of %pl that is causing these issues.
Otherwise it is difficult to identify the problem and comment.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 888

PostPosted: Mon Mar 19, 2018 4:25 am    Post subject: Reply with quote

FK_GER ... which version of ftn95 are you using ?

(P.S. - for future reference this type of post concerning %pl should be put in the CLEARWIN forum !)

If you've got the patience and a year or two Wink there are at least 3 major posts in the CLEARWIN forum which cover several of the points you raise here.
__________________________________

Paul, I'm confused again that apparentley you don't know definitively which of the issues here might (or might not) be resolved by current progress on %pl activities.
For example, the correct centre-ing of sub-titles on axes is a long-standing issue. (not restricted to the rh justification on x-axis - also if y axis is across -ve through positive ranges the centre-ing is only on positive part of axis)
Isn't it possible to give a list of:- i) enhncements already made/implemented ii) enhancements in progress ?

Update 19/3/2018 20h 45
Having said that I now see v8.3 (ful lversion has been released), but the answer to both questions i) and ii) are not at all clear from the summary on the Release post.
_________________
''Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they should be powerful beyond imagination. But ...''


Last edited by John-Silver on Mon Mar 19, 2018 8:47 pm; edited 3 times in total
Back to top
View user's profile Send private message
FK_GER



Joined: 26 Oct 2017
Posts: 24
Location: University of Kassel,Germany

PostPosted: Mon Mar 19, 2018 4:17 pm    Post subject: Reply with quote

By your remarks I suppose, that the most of the my prescribed problems results from the used personal edition of FTN95, which is an elder Version (8.1). I've just seen, that FTN95-Version 8.3 is released today. I hope, that a lot of problems are solved in this version.
By the way, at the beginning of my programs I'm using INCLUDE <windows.ins>, nothing more.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 888

PostPosted: Mon Mar 19, 2018 7:27 pm    Post subject: Reply with quote

Maybe, maybe not ....

all we see related to %pl from the release notes for v8.3 at http://forums.silverfrost.com/viewtopic.php?t=3737 is:-

NEW FEATURES:-

Quote:
ClearWin+: Additional functionality added to native SIMPLEPLOT


Quote:
ClearWin+: PRINT_GRAPHICS@ provides a simple interface to print graphics such as native SIMPLEPLOT graphs


BUG FIXES:-
Quote:

NOTHING


from which I deduce that the reply to my question above will be ... nothing has been corrected (since v8.2 that is - we know some things have been changed there ... I think)

We personal users have been waiting 4 1/2 months for a 'catch-up' personal version release to 8.2 and now we see a v. 8.3 (paying customers version) hitting the streets !

This is a little perturbing (from my point of view anyway, that at least a perso v. 8.2 release has not been released at the same time.
I say this having invested a lot of personal time and effort helping track down %pl bugs to try to get it up to a minimum capability level.

For the upteenth time I'll say that I understand perfectly well the need to have a stepped release between paying customers and the perso version, BUT as others have posted before, the Silverfrost 'philosophy' of getting user-interaction to help de-bug new features should be a 2-way thing.

I hope I'm wrong and a new perso version hits 'the shops' soon and that it's 8.3 not 8.2 . Mutual appreciation demands it imo.

The lack of indication of bug fixes (like the axes labels centreing for example, or the auto-scales selection (especially log scales) is worrying imo since the addition of new features --(those cited above) might be very welcome (the new PRINT_GRAPHICS@ sounds interesting, but all these other 'additional functionality' what's all that about ?) but surely bug-fixes should be a priority or at least on level terms ?

Of course the .enh file of v8.3 might reveal many things fixed. We await someone to tell us !
_________________
''Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they should be powerful beyond imagination. But ...''
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1824
Location: Yateley, Hants, UK

PostPosted: Mon Mar 19, 2018 8:05 pm    Post subject: Reply with quote

You may prefer to draw things using the ordinary graphics primitives, thus:
Code:

      WINAPP
      OPTIONS (INTL, DREAL)
      PROGRAM RC_SECTION
      INCLUDE <WINDOWS.INS>
      INTEGER, EXTERNAL:: KB_DRAW_FN
      IK = WINIO@('%ca[RC Cross Section]&')
      IK = WINIO@('%gr[white]%ff%rj%10^bt[Draw]', 400, 400, KB_DRAW_FN)
      END
      INTEGER FUNCTION KB_DRAW_FN()
      INCLUDE <WINDOWS.INS>
      CHARACTER*(21) STRING
      STRING = 'RC Beam Cross Section'
      CALL DRAW_FILLED_RECTANGLE@(200,50,300,350,RGB@(200,200,200))
      CALL DRAW_RECTANGLE@(200,50,300,350,RGB@(0,0,0))
      CALL DRAW_FILLED_ELLIPSE@(220,70,5,5,RGB@(50,50,50))
      CALL DRAW_FILLED_ELLIPSE@(280,70,5,5,RGB@(50,50,50))
      CALL DRAW_FILLED_ELLIPSE@(220,330,5,5,RGB@(50,50,50))
      CALL DRAW_FILLED_ELLIPSE@(280,330,5,5,RGB@(50,50,50))
      CALL DRAW_CHARACTERS@(STRING,50,10,RGB@(0,0,0))
      CALL DRAW_LINE_BETWEEN@(190,200,310,200,RGB@(0,0,255))
      CALL DRAW_LINE_BETWEEN@(250,40,250,360,RGB@(255,0,0))
      CALL PERFORM_GRAPHICS_UPDATE@()
      KB_DRAW_FN = 2
      END


Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 888

PostPosted: Mon Mar 19, 2018 9:37 pm    Post subject: Reply with quote

Well spotted Eddie !
I hadn't even looked at the code as I was concentrating on the list of things not working !

Maybe though there's a reason ...
FK_GER , why do you want to draw the figure as a 'graph' and not just as a 'pgraphic icture' as Eddie demonstrates ?

Apart from that, I notice that in your code you haven't included
Quote:
CALL winop@("%pl[native]")

so you must be compiling in 64-bit mode is that right ?

Also, the option 'independent' should only be set once.

I suggest you go and check all the occurrences of the various parameters you've set against the (on-line) documentation here:
https://silverfrost.com/ftn95-help/clearwinp/simplepl/native.aspx
Noting thaqt it's the v8.2 documentation (or maybe v8.3 now ???) and so some things won't be applicable to v8.1 e.g. the option 'stacked' is not in v8.1!!!
_________________
''Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they should be powerful beyond imagination. But ...''
Back to top
View user's profile Send private message
FK_GER



Joined: 26 Oct 2017
Posts: 24
Location: University of Kassel,Germany

PostPosted: Tue Mar 20, 2018 4:40 pm    Post subject: Reply with quote

Thanks for your replies. But they don't help at my problems really.

I've tested the shown example from Eddie, but that's not what I'm needed.
The example is pixel-orientated, but all my data is coordinate-orientated. And there are variable cross-sections with shapes of rectangle-, L-, T- or I-profile with very different dimensions. Moreover the numbers of reinforcements differs between 1 and 50.

I have had tested the option "native", but without any effect. If I must compiling in a 64-bit mode, from where I can get a 64-bit version of the personal edition? (My windows system is a 64-bit system)

Yesterday I've contacted the Silverfrost Company per E_Mail and asked for a new version of the personal edition. Today I got the following message:
"The intention is that there will be a FTN95 8.30 Personal Edition in the next few weeks."

I hope, that then some problems will be solved. But when I recognize your discussion afore properly, I'm doubtfully.

At last some screenshots of two examples, calculated with the XP-programs. I hope, all is adjusted correctly at the image-server, so that you have a look at the pictures.
Example Q1-xx shows the example of a calculated I-cross section, graphics are generated with the 'scigraph-package' from compaq.
Example B3-xx shows the course of the stiffnesses for bending and torsion during the calculation, graphics are generated with the 'array viewer' from compaq.
https://postimg.org/gallery/1vbxb1apy/
https://postimg.org/gallery/18s6cuwsm/
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1972
Location: Sydney

PostPosted: Wed Mar 21, 2018 2:16 pm    Post subject: Re: Reply with quote

FK_GER wrote:
I've tested the shown example from Eddie, but that's not what I'm needed.
The example is pixel-orientated, but all my data is coordinate-orientated. And there are variable cross-sections with shapes of rectangle-, L-, T- or I-profile with very different dimensions. Moreover the numbers of reinforcements differs between 1 and 50.


I am surprised by your comment, as I would expect that Eddie's %gr approach would be much more suitable for managing the variation in section shape and bar locations. If you want a flexible approach, I would recommend you reconsider what Eddie has suggested.
Back to top
View user's profile Send private message
FK_GER



Joined: 26 Oct 2017
Posts: 24
Location: University of Kassel,Germany

PostPosted: Wed Mar 21, 2018 4:37 pm    Post subject: Reply with quote

Dear JohnCampbell,
Please, have a look in the following picture https://postimg.org/image/3y40tu0kl/, and then tell me, how to manage this graph with Eddie's proposal.
FK
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1972
Location: Sydney

PostPosted: Thu Mar 22, 2018 6:37 am    Post subject: Re: Reply with quote

FK_GER wrote:
Please, have a look in the following picture, and then tell me, how to manage this graph with Eddie's proposal.
FK
I would expect that a suitably developed subroutine library would be more suited to %gr. My FEA graphics system is based on %gr and I would not limit this to be considered as a "graph". My comment was a recommendation to consider the %gr alternative.

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



Joined: 30 Jul 2013
Posts: 888

PostPosted: Mon Mar 26, 2018 9:05 pm    Post subject: Reply with quote

FK_GER , can you post a full working (running even if fails) code so we have something to work wit, not forgetting inoout data too !!!
_________________
''Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they should be powerful beyond imagination. But ...''
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 -> Support 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