Silverfrost Forums

Welcome to our forums

Dynamic Simpleplot

9 Mar 2013 12:19 #11679

Would be nice and logical to extend a bit functionality of Simpleplot by allowing some dynamic run-time changes the same way and style as it is typically done in CWP by using @ -- in this case by %pl@ instead of fixed parameters %pl[parameters] :

  text256 = 'x_axis='Width [rel.un.]',y_axis='Intensity [rel.un.]',&
  &title='Intg (black),  Inst (red)',colour=red,&
  & X_ARRAY, LOG_LOG, N_GRAPHS=2'

  i=winio@('%pv%pl@&', text256, 500, 300, npoints, Xarray, Yarray, Yinterp )

This would allow to set Y minimum and maximum, change LOG and LIN axis scales, change titles and axis names etc:

Another improvement would be allowing multiple plots with their own sets of (X,Y) pairs. Right now for multiplots Simpleplot allows just one common X set for multiple Y ones.

9 Mar 2013 6:54 #11680

Thanks for this.

9 Mar 2013 12:01 #11684

And by Simpleplot i always meant just the %pl, the clever idea general Fortran is missing, I never used the whole Simpleplot subroutines package which seems is not supported anymore by the author ( I may try it if its library is free now to find if something is useful and not too obsolete there). Rebuilding just the %pl if Silferfrost will decide so would be not that difficult, just follow 2-3 best ever looking (with WOW factor) most common 2D and 3D examples (for which use OpenGL) and forget about anything else which may bury you for years and decades into heavy programming.

(May be the best ever strategy for best graphics would be to link CWP not to libraries but to professional graphics editing packages like Origin, Techplot...The idea is to edit the graph in, say, Origin and then make its setup callable from CWP. If you have many graphs in your programs - they all will have their own Origin setup. Then if you will need some adjustments, for example change the font or Y limit, - all must be done within Origin, the Fortran code with CWP just supply data and arrange the window size and position where graph will appear. That way graphics within Fortran will never be obsolete and will not need support. Such type of graphics packages usually do not go out of business quick because of their often use in presentations everyone now do unlike all callable libraries only few programmers use)

Please login to reply.