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 ... 18, 19, 20 ... 23, 24, 25  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 22, 2017 10:49 pm    Post subject: Reply with quote

You have to play with the input parameters to see the failure.
All of this (relating to Dan's program and Ken's program) has now been fixed. For the next release of the ClearWin+ library. Dan's original code (with minor adjustments) will probably also work.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Nov 22, 2017 11:22 pm    Post subject: Reply with quote

Thanks Paul.
And great when there is a lot of interested users, the pants on devilry responsible on all FTN95 bugs burn like a fire near mount Diablo.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 756

PostPosted: Thu Nov 23, 2017 7:09 am    Post subject: Reply with quote

I'll have a look, which code, original or 'corrected' ?

Don't forget a comment I posted earlier in this thread ìwhere I saw incorrect spacing of gridlines in an example !
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Nov 23, 2017 9:53 am    Post subject: Reply with quote

And one minor detail for quick fix for Paul: the minus sign in negative part of Y axis in my or Ken's examples is also placed way too far from the number labels. I had to photoshop spaces out before showing plots to others
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 756

PostPosted: Thu Nov 23, 2017 10:12 am    Post subject: Reply with quote

sorry, can't run Ken's codes because gridlines isn't in v8.1

don't forget the missing '0' at Y-acxis origin too (identified previously)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Nov 23, 2017 7:41 pm    Post subject: Reply with quote

Dan

If you mean, for example, the distance between '-' and '3' in -3.0 then that depends only on the font that is used. There is no space character that separates the minus from the 3.0.

You could try using different fonts in your code to see if another font gives a better result.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Nov 23, 2017 11:46 pm    Post subject: Reply with quote

All,
Can you confirm Paul's words using his own last example on page 17? I see on X axis the minus sign on labels looks OK, on Y axis it is way off, specifically with large fonts, any type of fonts


Last edited by DanRRight on Fri Nov 24, 2017 10:45 am; edited 1 time in total
Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Fri Nov 24, 2017 9:15 am    Post subject: Reply with quote

The second plot below shows Dan's extra space between minus sign and number.

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



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

PostPosted: Fri Nov 24, 2017 10:40 am    Post subject: Reply with quote

Thanks, Ken, this on the right is what i see. And sometimes this becomes a disaster like here

Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Fri Nov 24, 2017 11:11 am    Post subject: Reply with quote

Disaster indeed Dan, that's another reason why on option to place the scales out side the frame would be beneficial. It would eliminate the scale text from x and y axis overlapping in cases like this:-

Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Fri Nov 24, 2017 11:27 am    Post subject: Reply with quote

Ken

How did you get a y interval of 3 and just one significant figure in the y values?
Back to top
View user's profile Send private message
silicondale



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

PostPosted: Fri Nov 24, 2017 11:38 am    Post subject: Reply with quote

Surely the default should be that annotation is placed outside the box? Almost always it will interfere (or there is a risk that it will interfere) with data being plotted within the box. When I developed a graphic subsystem (from first principles) in the 1970s and 1980s my users would never have even considered having annotation along axes within the plotting area !
http://www.vmine.net/g-exec/doc/gplot.pdf
Back to top
View user's profile Send private message Visit poster's website
Kenneth_Smith



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

PostPosted: Fri Nov 24, 2017 12:08 pm    Post subject: Reply with quote

Paul,

Using Dan's code:-

Code:
module surfplot2mod
   use clrwin
   integer (7) ihandleSP2
   real*8 x(2),y(2), xEllipse, yEllipse
   real*8 xAxisMin, xAxisMax, yAxisMin, yAxisMax

CONTAINS
   INTEGER FUNCTION plotSP()
   x(1)=xAxisMin
   x(2)=xAxisMax
   y(1)=yAxisMin
   y(2)=yAxisMax
   call simpleplot_redraw@
   ixR=7; iYr=7
   call get_plot_point@(1d0, 1d0, xEllipse, yEllipse)
   call draw_filled_ellipse@ (nint(xEllipse), nint(yEllipse),ixR,iYr,rgb@(244,0,0) )
   call UPDATE_WINDOW@(ihandleSP2)
   plotSP= 2
   end function plotSP
!......................................................
   INTEGER FUNCTION clearPL()
     CALL simpleplot_redraw@()
     clearPL = 2
   END FUNCTION clearPL
end module surfplot2mod

!.......................
Program SurfPlot2
use surfplot2mod
   xAxisMin =-4
   xAxisMax = 5
   yAxisMin =-4
   yAxisMax = 5
   x(1)=xAxisMin
   x(2)=xAxisMax
   y(1)=yAxisMin
   y(2)=yAxisMax
   i = winio@  ('%ww%nr&')                           
   call winop@ ('%pl[native,x_array,N_GRAPHS=1]')
   call winop@ ('%pl[scale=linear]')
   CALL winop@("%pl[tick_len=9]")
   i = winio@  ('%sf%ts%bf&', 2d0)   
   call winop@ ("%pl[framed,axes_pen=3,width=3,x_axis='Length',y_axis='Width']")
   i = winio@  ('%pv%pl&',800,600,2,x,y)!
   i = winio@  ('%sf%ts%ff&', 1d0)
   i = winio@  ('Set Xmin, Xmax%ta%df%9^rf%df%9^rf%ff&',1d-1,xAxisMin,'+', clearPL, plotSP,  1d0, xAxisMax,'+', clearPL, plotSP)
   i = winio@  ('Set Ymin, Ymax%ta%df%9^rf%df%9^rf%ff&',1d-1,yAxisMin,'+', clearPL, plotSP,  1d0, yAxisMax,'+', clearPL, plotSP)
   i = winio@  ('%cn%^bt[PLOT]%^bt[Clear]%ff&', '+', clearPL, plotSP, clearPL)
   i = winio@  ('%ac[Esc]&', 'exit')
   i = winio@  ('%hw%lw', ihandleSP2, lw_SP2)     
   jj = plotSP()
   end


Use the spinwheel to change ymax, and observe y axis change multiple times for values between 5 and 20.

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



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

PostPosted: Fri Nov 24, 2017 12:25 pm    Post subject: Reply with quote

Paul,
See also my "Curly Wurly" code posted on Fri Sep 22, 2017 2:25 pm, I think this is the same basic problem. I've just rerun this with 8.2 and the strange effects on both axis scales are still apparent.
Ken
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Fri Nov 24, 2017 6:13 pm    Post subject: Reply with quote

Ken and Dan

The rogue space has now been located. Thank you.

silicondale

You may be right be don't forget that this development as grown out of the existing SIMPLEPLOT %pl.
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 ... 18, 19, 20 ... 23, 24, 25  Next
Page 19 of 25

 
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