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

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



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

PostPosted: Mon Sep 03, 2018 4:15 pm    Post subject: %pl - suppress tick-numbers ? Reply with quote

Hello everyone,
with some efforts my progam draws the following plot :

[img]https://postimg.cc/gallery/dha7zr7q/

The only unbeautiful thing is, that the tick-numbers lay in the space of the figure.
Has anybody an idea to prevent these tick-numbers?
My intensive search in the forum to find a solution failed, sadly.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Sep 03, 2018 5:09 pm    Post subject: Reply with quote

The %pl option [external_ticks] might be relevant.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Tue Sep 04, 2018 11:23 am    Post subject: Reply with quote

John,

Whether or not it is the case here (about the ticks being different lengths) such effects may be the result of converting real coordinates into integer pixel coordinates. In the worst case, you can be out by a pixel at each end, and this shows up on a low resolution device like a screen, but not on a high resolution printer.

A further advantage of using the graphics primitives is that you can fill areas in colour.

Eddie
Back to top
View user's profile Send private message
FK_GER



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

PostPosted: Tue Sep 04, 2018 4:45 pm    Post subject: Reply with quote

Some additional comments to my plot:
The shown plot is a part of a program to calculate the stress limit of an reinforced concrete cross section. This program works with an right orientated, three-dimensional x-y-z-coordinate-system, where the x-axis is the longitudinal axis of a girder and the cross section lays into the y-z-plane. This means for a top view of the cross section, that the positive y-axis runs from left to right and the positive z-axis from up to down. The origin of the coordinate-system lays in the middle of the upper edge of the cross-section. All input- and output-data of the program is done in this coordinate-system. To keep these settings for drawing the cross-section as shown, the y-data is plotted in x-direction and the z-data in (-y)-direction. In doing so the numerical data in both directions is correct, except the sign for the y-direction.
I've tried already a version with z-data in (+y)-direction - no problem after an equivalent coordinate transformation. But then the x-axis and the origin too is at the bottom of the cross-section. Now the numerical data in x-direction is correct indeed, but in y-direction the the numerical data runs from down to up. For the program user is this confusingly.

Here the extract of my actual source-code of the drawing part:
All data is available and specified correctly.
Code:
[color=green][/color]
!C opening the plot-window,  Drawing a XY Graph
      iw0=winio@('%sp&',plox,ployo)
      iw0=winio@('%pv%aw&',ctrl0)
      iw0=winio@('%ww[no_border]&')
      iw0=winio@('%`bg[white]&')
      iw0=winio@('%ca[Querschnitt und Bewehrungen]&')
      CALL winop@("%pl[external_ticks]")
      CALL winop@("%pl[y_min=-2.01,y_max=0.01]")
      CALL winop@("%pl[x_min=-0.5,x_max=+0.5]")
      CALL winop@("%pl[dx=0.1,dy=0.1]")
      CALL winop@("%pl[gridlines]")
      CALL winop@("%pl[x_array]")
      CALL winop@("%pl[independent]")
       CALL winop@("%pl[n_graphs=2]")
       iw0=winio@('%pl',plopix,plopiy, &
          NP2,xData(1:np2(1),1),yData(1:np2(1),1),xData(1:np2(2),2),yData(1:np2(2),2))
       
!C  axis-labels
      CALL draw_characters@('Querschnittsbreite [m]',ihx,ivx,RGB@(0,0,0))
      CALL rotate_font@(wi90)
      CALL draw_characters@('Querschnittsh�he [m]',ihy,ivy,RGB@(0,0,0))
      CALL rotate_font@(wi00)
!C  legends
      CALL draw_filled_rectangle@(reh1,rev1,reh2,rev2,RGB@(0,0,0))
      CALL draw_polyline@(ibqh,ibv1,2,RGB@(0,0,0))
      CALL draw_characters@(LEGE(KB)(1:LG(KB)),ib1,ivv0,RGB@(0,0,0))
      ...... and so on

Still a remark to the y-axis settings:
The settings CALL winop@("%pl[y_min=-2.0,y_max=0.0]") causes, that the lines and symbols, which are laying on the border/frame directly, are clipped. Only the part inside frame is drawn. This was in Version 8.1 not the case!

My question again:
Is it possible to prevent the tick-numbers of both axes?
Then I couldt set my own tick-numbers outside the frame e.g. with CALL draw_characters@ .
Back to top
View user's profile Send private message
FK_GER



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

PostPosted: Wed Sep 05, 2018 4:23 pm    Post subject: Reply with quote

John, I've tried your proposal and replaced [external_ticks] with [frame]. Many thanks, it works!
The only defect is the negative sign of the numbers in y-direction.

I also work with MATLAB. There exist the possibility to manipulate the numbers of axes-labels in the following easy way:

ytlab=get(gca,'YtickLabel');
[my1,my2]=size(ytlab);
ytlab(my1,1:my2)=' '; !!sets the first sign to 'blanc'
set(gca,'YtickLabel',ytlab,'YtickMode','manual');
xtlab=get(gca,'XtickLabel');
[my1,my2]=size(xtlab);
xtlab(my1,1:my2)=' '; !!sets the first sign to 'blanc'
set(gca,'XtickLabel',xtlab,'XtickMode','manual');

I hope the code is self-explanatory; gca means "get current axis"

My question at the experts: Exists a similar way in the used fortran too?
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Thu Sep 06, 2018 1:56 am    Post subject: Reply with quote

My recommendation would be to use %gr, rather than %pl.
You would have much more flexibility with layouts. Just divide the annotation tasks up and write routines for each task. It has to be easier that trying to contort the problem to being a graph.
It should not too hard to draw a grid; draw a section; draw reio bars; draw shear bars; annotate section etc. Start small then add features to each routine.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Sep 07, 2018 7:10 am    Post subject: Reply with quote

John-Silver

If you have simple code that illustrates these "simple bugs" then please post the code so that they can be fixed.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Sat Sep 08, 2018 7:44 am    Post subject: Reply with quote

John

If you can provide new short and simple programs that illustrate these "faults" one at a time then I will try to find time to look at them. You will have to make it easy for me. There are too many other demands on my time.
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
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