soccer jersey forums.silverfrost.com :: View topic - Hershey fonts available for Simpleplot
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 

Hershey fonts available for Simpleplot
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
DanRRight



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

PostPosted: Wed Sep 24, 2014 10:49 am    Post subject: Reply with quote

Well, a hack is just a hack. Pity, and i'd say shameful, that SP development was abandoned and it was left to die slowly for last 20 years. This specific property of margin change wasn't the part of design concept for %pl -- that is what you guys uncovered by hacking, and that is what i would like to see in the future Simpleplot. It must be the mighty, well adjusted publication quality package, still super-simple and super-convenient as it was imagined from the start and it actually is. It must be completely controllable in all its tiny properties from the full Simpleplot if needed.

Simpleplot %pl achieved literally godlike simplicity. That is exactly what we all need all our life - we make thousands of simple estimations and that must be easy and handy. So far it is the only graphics package in the world which can plot in ONE SINGLE FORTRAN LINE including all the declarations, data preparation and even Fortran END statement! Take this snipped into your computer and try - it's fun. Compilation is super-simple too - FTN95 aaa.f95 /lgo.

Code:
Real*8 x(100),y(100);N=100;do i=1,N;x(i)=i;y(i)=i**2;enddo;i=winio@('%ww%pv%pl[x_array]',400,300,N,x,y);End


and it even can be beautified a bit with few hacks (though it supposed to be perfectly looking without it. For others who see that for first time - compile it usual way because you will need to add here at compile time SIMPLE.DLL. And of course to activate Hershey fonts as it was explained at the beginning of this thread):

Code:
Real*8 x(100),y(100);N=100;do i=1,N;x(i)=i;y(i)=i**2;enddo;call chset(-11);CALL AXLBJS('*C','C');i=winio@('%ww%pv%pl[x_array]',400,300,N,x,y);End


The fact that this long line also compiles fine is another hack Smile

The plotting itself is actually done in just few symbols, isn't this simply amazing ?
Code:
i=winio@('%pl[x_array]',400,300,N,x,y)


By the way, here is the question to our hacks, is there possibility to save Simpleplot %pl screen in graphics format like we do with %gr? I'm having difficulties to save plots using PrtScr button grabbing the whole PC screen into clipboard, it is getting on my nerves and permanently hiccups on my computer, i push the button up to 20 times and still having old image in the clipboard when there are a lot of windows open,y


Last edited by DanRRight on Thu Sep 25, 2014 9:19 am; edited 5 times in total
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Sep 25, 2014 1:58 am    Post subject: Reply with quote

I am very sorry to tell you that with %pl I do not see any way to send the graph to a printer. (I tried several ideas without success) ...as it is not possible to asign a handle to the window, I do not see how could one get the graphic region and copy it to a printer....with the other (my) way, you can select a printer or even to output to a windows metafile....but it is the other way....i.e. no %pl.....however, I think that we could start another topic about the possibility of improving %pl and see what Paul has to say....maybe it is not in his plans, but I guess that he could explain us how difficult could be to modify %pl in order to get some of the things you are asking......maybe the addition of a handle to %pl is not hard to do......

Agustin
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Sep 25, 2014 7:04 am    Post subject: Reply with quote

In theory it would be possible for us to make changes to the ClearWin+ interface for %pl but we do not have the source code for SIMPLEPLOT. In any case, with so many other demands on our time, it seems unlikely that we will be able to make any changes in the short to medium time frame.
Back to top
View user's profile Send private message AIM Address
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Sep 25, 2014 5:23 pm    Post subject: Reply with quote

well....this means that we are in a dead point......at least for the short and medium time frame....in the meanwhile Dan, I can offer you the alternative solution if you need a greater versatility with your graphs (i.e. different outputs). See the following code:
Code:
module funciones
integer xx,yy,resize
integer*4 ans
real*4 x(100), y(100), z(100), u(100), v(100), w(100),max_y,min_y
real*4 ymin,ymax,zmin,zmax,umin,umax,vmin,vmax,wmin,wmax
real*8 ::TextSize=0.4
integer*4 :: iLineTrace=0, iLineColor=1, iLineWidth=4
integer :: iCharacterSetNo = -11,iOrientation=2
integer :: newLineTrace=0,newLineColor=1,newLineWidth=4,nplot=0
real*8 :: LeftMrgn=2.0, RightMrgn=0.5, BottomMrgn=2.0, TopMrgn=1.0
type plot
integer ::LineTrace=0
integer ::LineWidth=0
integer ::LineColor=1
end type plot
type(plot), dimension(5) :: curve

contains
integer function bitmap()
use spwin
use mswin
resize=clearwin_info@('GRAPHICS_RESIZING')
IF(resize.EQ.1)THEN
xx=clearwin_info@('GRAPHICS_WIDTH')
yy=clearwin_info@('GRAPHICS_DEPTH')
HDC_DIM%iWidth = xx
HDC_DIM%iHeight = yy
HDC_DIM%iBitmapDC=clearwin_info@('GRAPHICS_DC')
endif
CALL SP_SupplyBitmap     ! Pass Bitmap to SIMPLEPLOT
call plot_curves
call updatewin
bitmap=1
end function bitmap

subroutine plot_curves
if(nplot/=0) then
curve(nplot)%LineWidth=newLineWidth 
curve(nplot)%LineTrace=newLineTrace 
curve(nplot)%LineColor=newLineColor 
curve(nplot)=plot(newLineTrace,newLineWidth,newLineColor)
  else
iLineTrace=0;iLineColor=1;iLineWidth=4;LeftMrgn=2.0;RightMrgn=0.5;BottomMrgn=2.0;TopMrgn=1.0   
iCharacterSetNo = -11;iOrientation=2
curve(1)=plot(0,4,1)
curve(2)=plot(0,4,2)
curve(3)=plot(0,4,3)
curve(4)=plot(0,4,4)
curve(5)=plot(0,4,5)
endif
CALL PICMRG(sngl(LeftMrgn),sngl(RightMrgn),sngl(BottomMrgn),sngl(TopMrgn)) ! set PICture MaRGins!
CALL DIAGLV (0) ! suppresses creation of MESSAGES.TXT file
call pagvw(iOrientation)
CALL TEXTMN(sngl(TextSize))
CALL AXLBJS('*C','C')
call chset(iCharacterSetNo)
N=100
do i=1,N;
x(i)=i-1;
y(i)=sin(i/30.)**2;
z(i)=sin(i/30.)**5;
u(i)=sin(i/30.)**10;
v(i)=cos(i/30.)**10;
w(i)=sin(i/30.)**2 * cos(i/30.)**2;
enddo
call limexc(y,n,ymin,ymax)!max and min values of y,z,u,v,w...
call limexc(z,n,zmin,zmax)
call limexc(u,n,umin,umax)
call limexc(v,n,vmin,vmax)
call limexc(w,n,wmin,wmax)
max_y=max(ymax,zmax,umax,vmax,wmax)
min_y=min(ymin,zmin,umin,vmin,wmin)
CALL DIAGLV (0)
call pgfull(.true.)
call  setpns(1,1,1,1)!reset the pen colours before redrawing
CALL AXLBJS('*C','C')
call axsbtk('XC','I')
call axsbtk('YC','I')
CALL SCALES(0.0,100.0,1,min_y,max_y,1)
call thckmg('LINE', 2.0) 
call axes7('time','Amplitude')
CALL AXLBJS('*C','C')
call thckmg('LINE', float(curve(1)%LineWidth)) 
call pen(curve(1)%linecolor)
CALL BRKNCV(x,w,N,curve(1)%LineTrace)
call thckmg('LINE', float(curve(2)%LineWidth)) 
call pen(curve(2)%linecolor)
CALL BRKNCV(x,y,N,curve(2)%LineTrace)
call thckmg('LINE', float(curve(3)%LineWidth)) 
call pen(curve(3)%linecolor)
CALL BRKNCV(x,z,N,curve(3)%LineTrace)
call thckmg('LINE', float(curve(4)%LineWidth)) 
call pen(curve(4)%linecolor)
CALL BRKNCV(x,u,N,curve(4)%LineTrace)
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Sep 25, 2014 5:27 pm    Post subject: Reply with quote

(follows here)

Code:

call pen(curve(4)%linecolor)
CALL BRKNCV(x,u,N,curve(4)%LineTrace)
call thckmg('LINE', float(curve(5)%LineWidth)) 
call pen(curve(5)%linecolor)
CALL BRKNCV(x,v,N,curve(5)%LineTrace)
end subroutine plot_curves

integer function change_plot()
use spwin
if(nplot==0) then
  call plot_curves
  call updatewin
  else
newlineWidth = curve(nplot)%LineWidth
newLineTrace = curve(nplot)%LineTrace
newLineColor = curve(nplot)%LineColor
call updatewin
endif
change_plot=1
end function change_plot

integer function reset_plot()
use spwin
nplot=0
call plot_curves
call updatewin
reset_plot=1
end function reset_plot

integer function select_output()
call OWNNEW(.true.)
call devnam("")
call plot_curves
call endplt
select_output=1
end function select_output
end module funciones

program Resized_Simpleplot_plots
use mswin
use spwin
use funciones
ans=winio@('%sy[3d_raised]%ca[Fine control of plots attributes with Simpleplot]%bg[grey]&')
ans=winio@('%il&', -12,26)
ans=winio@('%taCharset      %dd%6^rd& ', 1, iCharacterSetNo, bitmap)
ans=winio@('%fl&', 0.0D0,10.0D0)
ans=winio@('%taText   size   %df%6^rf& ', 1d-2, TextSize, bitmap)
ans=winio@('%il&', 2,7)
ans=winio@('   Orientation     %dd%6^rd& ', 1, iOrientation, bitmap)
ans=winio@('   L R B T margins   %df%6^rf%df%6^rf%df%6^rf%df%6^rf%ff&', 5d-1,LeftMrgn, bitmap, &
          5d-1,RightMrgn, bitmap, 5d-1,BottomMrgn, bitmap, 5d-1,TopMrgn, bitmap)
ans=winio@('%il&', 0,5)
ans=winio@('%nl%taPlot%ta%dd%6^rd&',1,nplot,change_plot)
ans=winio@('%ta Line width   %dd%6^rd& ', 1, newLineWidth, bitmap)
ans=winio@('%il&', -6,6)
ans=winio@('  Line trace       %dd%6^rd&     ',1,newLineTrace,bitmap)
ans=winio@('%il&', 0,26)
ans=winio@('%taLine color    %dd%6^rd%ff& ',1,newLineColor,bitmap)
ans=winio@('%2nl%cn%ww%pv%^dw[user_resize]&',800,600,bitmap) ! Pass bitmapDC to ClearWin
ans=winio@('%ff%nl%cn%6bt[Close]%2ta%6^bt[Print]%2ta%6^bt[Reset]',select_output,reset_plot)
end program resized_simpleplot_plots   


it allows you to "Print" and setup your printer, or to select a different output such as a new window, a windows metafile, etc......and I have been playing with the code in a way that you can change the atributes of each plot or reset all to the initial conditions...I guess you can do the same with %pl, EXCEPT to print the graph.....

Agustin
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Fri Sep 26, 2014 3:40 pm    Post subject: Reply with quote

Thanks Agustin. May be some day i will need that but you know my problem is that i do not want to touch and use so far dead buggy graphics language. As Paul mentioned that they still do not have access to the SP sources that means nothing but the

*** death of Simpleplot ***

As you have seen above i have written my own graphics package. I also used some Simpleplot %sp due to its simplicity. But i will rewrite everything into own graphics if the destiny of sources will not be addressed.

BTW, have you also noticed that if you save screen into Windows metafile the fonts are substantially changed to the worse from what we see on the screen?
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Fri Sep 26, 2014 4:04 pm    Post subject: Reply with quote

your welcome Dan!......in my case I will continue using Simpleplot because is the only one I found that can be used with Clearwin in a %dw window.....I have given a look at DSLIN but it seems to have no chance of interfacing with Clearwin, which for me is important if one is developing a program as a Windows application.....I still have some expectancies that Simpleplot will return (like James Bond Smile ) in a not so far future......who knows?

as for the windows-metafile.....well......my results are different.....I get what I see in the window.....same fonts.....I do not know why you get different results......at least using the code I put yesterday.....

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Fri Sep 26, 2014 4:16 pm    Post subject: Re: Reply with quote

John-Silver wrote:
Nice work Agustin, except I don't get any Close-Print-Reset buttons when I tried to run your last code !
I have the Clearwin drawing surface which goes right to the bottom of the window with NO buttons below it.


that's quite strange because the last line of my code clearly states:

ans=winio@('%ff%nl%cn%6bt[Close]%2ta%6^bt[Print]%2ta%6^bt[Reset]',select_output,reset_plot)

so the buttons should be there......

Quote:
For some reason the ticks are now inside the axes, is that deliberate to avoid 'touching' with tick labels ?


that's because I use now: call axsbtk('YC','I') and call axsbtk('XC','I')

Quote:

Apart from that, try playing with the margins as follows .... keep increasing the RH margin width and you'll see the LH axis label eventually 'flips' inside the plot. Similar when you increase the upper margin, the x-axis label will flip inside.
I thought (somehow) you had resolved the problem I mentioned before but clearly the relation between window size-page size and margins is more complex.


yes, let me check that.....

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Fri Sep 26, 2014 5:52 pm    Post subject: Reply with quote

Quote:
Apart from that, try playing with the margins as follows .... keep increasing the RH margin width and you'll see the LH axis label eventually 'flips' inside the plot. Similar when you increase the upper margin, the x-axis label will flip inside.
I thought (somehow) you had resolved the problem I mentioned before but clearly the relation between window size-page size and margins is more complex.


I found the problem!.....in the last version of the code, I added the call to PGFULL(.TRUE.), which maximised the size of the picture but at the cost of moving the periphery to the picture margins....and as Simpleplot needs a margin for depicting scales and legends, once the individual margins are moved by the user in such a way that there is no enough margin for legend and labels, Simpleplot moves them to the inside of the picture!.....Simpleplot just obeys the user: move the margin but at the same time put the programmed labels and legend .....so he tries the best he can.....therefore, just remove the call to PGFULL and problem solved!....I do not remember at which stage I decided to add that statement.....sometimes one writes first and thinks after.... Smile

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Sat Sep 27, 2014 12:06 am    Post subject: Reply with quote

which application are you using to open the .wmf file?......for instance, with Irfanview I see what you see, but with mspaint not......I have not tried to print the metafiles, so I do not know how they look when printing...but seems to be a question of the viewer...in fact if you import the .wmf file for instance into a Word document, you will see (I hope so...) that there is a margin around the graph....

about compiling: I use Plato, so that I open the Project Explorer, add SImpleplot.dll as reference file, then compile the Simpleplot module (spwin) first and then the working file...that's all...

Agustin
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Sun Sep 28, 2014 5:25 pm    Post subject: Reply with quote

And look how %pl plots LOG_LOG scale... hahahah... I'll get mental problem with this S#$%plot...Look at this X axis jumping off-lined numbering



Code:
!-------------------------------------------------------------------
! Program Simple2
! Compilation:
!>ftn95 aaa.for /free /debug /undef
!>slink aaa.obj "c:\Program Files (x86)\Silverfrost\FTN95\SIMPLE.DLL"
!
! With thanks to Agustin "Aebolzan" and John "John-Silver"
!         of the Fortran forum forums.silverfrost.com
!         for bringing almost dead Simpleplot to life
!-------------------------------------------------------------------
!
 Module SomeFun
 INCLUDE <windows.ins>

 real*8  TextSize
 integer LineWidth, iCharacterSetNo, iOrientation, LWindow
 real*8  LeftMrgn, RightMrgn, BottomMrgn, TopMrgn
 Real*8  x(1001), y(1001), z(1001), u(1001), v(1001), w(1001)
 CONTAINS
!--------------------------------------------------------------------
 integer function RedrawS ()

 CALL DIAGLV (0)
 call pagvw(iOrientation)
! set PICture MaRGins  L R B T 
 CALL PICMRG(sngl(LeftMrgn),sngl(RightMrgn),sngl(BottomMrgn),sngl(TopMrgn))
 CALL TEXTMN(sngl(TextSize)) ! 45)
 CALL AXLBJS('*C','C')
 call thckmg('LINE', float(LineWidth))
 call chset(iCharacterSetNo)

 call simpleplot_redraw@

 RedrawS = 2
 End function
 End Module SomeFun
!===============================================!===================================================================
 Program Simple2
 use SomeFun

 TextSize    = 0.41
 LineWidth    = 2
 iCharacterSetNo=-11   
 iOrientation   = 2
 LeftMrgn=2.5; RightMrgn=0.5; BottomMrgn=3.0; TopMrgn=1.0
 N=999
 A=1 ! 20000 
 do i=1,N;
   x(i)=i! -1;
   y(i)=A*sin(i/30.)**2;
   z(i)=A*sin(i/30.)**5;
   u(i)=A*sin(i/30.)**10;
   v(i)=A*cos(i/30.)**10;
   w(i)=A*sin(i/30.)**2 * cos(i/30.)**2;
 enddo


 i=winio@('%ww%sy[3d_raised]&') ! %bg[grey]
 i=winio@('%1tl%nd%nr&',16)
 i=winio@('%2.1ob[invisible,bottom_exit]&')
 i=winio@('Text   size   %ta%df%6^rf%ff&', 1d-2, TextSize, RedrawS)
 i=winio@('Line Width %ta%dd%6^rd%ff&', 1, LineWidth, RedrawS)
 i=winio@('%cb&')
 i=winio@('%taCharset  (-12 to +26)%ta%dd%6^rd&', &
          1, iCharacterSetNo, RedrawS)
 i=winio@('  Orientation  (2 to 7)             %dd%6^rd%ff&', &
          1, iOrientation, RedrawS)
 i=winio@('%taL R B T margins %ta%df%6^rf%df%6^rf%df%6^rf%df%6^rf%ff&', &
          5d-1,LeftMrgn,   RedrawS, 5d-1,RightMrgn, RedrawS, &
          5d-1,BottomMrgn, RedrawS, 5d-1,TopMrgn,   RedrawS)
 i=winio@('%cb&')
 i=RedrawS()
 i=winio@('%ww%pv%pl[x_axis="Time [s]",y_axis=Amplitude,&     
    &title="U (red),    U_A (orange),     I (blue) ", &
    & colour=red, colour=blue, colour=green, colour=black, &
    &colour=#CC8800, X_ARRAY, SCALE=LOG_LOG, N_GRAPHS=5]&',& ! =LINEAR
    & 800, 600, N, x, y, z, u, v, w)
 i=winio@('%ac[esc]%ff&', 'exit')
 i=winio@('%cn%^6bt[E&xit]','exit')

End Program
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Sun Sep 28, 2014 8:33 pm    Post subject: Reply with quote

I think that it would be interesting to know who created the %pl window and how could he designed it without having the Simpleplot code.....

I found some funny things between %pl and %dw: for instance, I was using PICMRG for setting the margins, but....PIC means "pictures", so that PICMRG was designed for setting the margins of the pictures inside the page of a graph....I have now used the (I think) more apropriate PAGMRG and I can set the margins without moving the graph towards the north-east when the margins become too restrictive (an effect noticed by John). However, PAGMRG does not work under %pl, only PICMRG...it sound like %pl works with the "picture", not with the "page" of Simpleplot......In fact, using Simpleplot I could depict 4 pictures inside a single page, as I am using Simpleplot subroutines, but with %pl you can plot only a single picture.......this is certainly a strong limitation of %pl.....

From the Simpleplot manual: "By default, the peripheral margin around a group of pictures is treated as two pairs of complementary margins (left/right and bottom/top) and each pair is distributed in a 2:1 ratio, left:right and bottom:top. PAGMRG specifies the size and distribution of these peripheral margins individually. "

The default margins, according Simpleplot, are restored by putting -1 in L,R,B and T....with a left margin of 0 it means that the axes goes to 0 and as there is no place for the legend and the labels, Simpleplot does the only thing that can be done: put the text inside the graph, i.e. after the axes....it could be sound strange, but it is a natural response for an 'unnatural' request from the operator.....

another interesting point is: Simpleplot allows log-log axis, but if the "x" or "y" arrays includes the value of 0.0, Simpleplot naturally refuses to plot a log and authomatically changes to linear scale the request of a log scale. In the case of %pl......well...%pl allows to plot a graph from an array that includes the value of zero....how %pl overrides SP restrictions?, I do not know....

Dan: you can use "call AXLBLV ('XC', 1)" if you like to have only powers of 10 in the log axis.....but I have no clue about how to move the labels a little bit downwards in order to look nicer.....sorry...

Agustin
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Sun Sep 28, 2014 9:46 pm    Post subject: Reply with quote

Thanks Agustin for the suppression of numbering between decades tip.

As to adjusting positions of numbering i remember I wrote email ~1.5 decades ago to developers of Simpleplot and got the respond that everything is possible there (without specifying how). Please continue hacking, seems that is the only way to use this half-tuned abandoned to die slowly soft Smile
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Mon Sep 29, 2014 5:47 pm    Post subject: Re: Reply with quote

John-Silver wrote:
Gentlemen, Welcome to the wonderful World of Margins Smile !!!
As you're beginning to see, nothing is as it seems ... or so it seems ... Smile
Remember though , that SimplePlot tries to be too clever for it's own good in 'automatically' re-adjusting things when the many parameters 'conflict'.
I'm still trying to get my head around it all.
Agustin, as well as Picture Margins and Page Margins there is Periphery, and also Group Margins.


Yes, I know, but I tried not to play with them because it would complicate the menu....

Quote:

You're probably right about %pl only plotting single graphs. For most that's all that's required I guess (doesn't mean it shouldn't be an option though).


I guess that the original idea of %pl was just to give the user a simple and fast way for plotting some data in a cartesian plot (see that there is no way to plot a surface, an histogram, a pie, etc., UNLESS you use the option user_drawn in %pl with a call-back function...).....and for a more complex graphs was of course the "elegant" solution of using %dw with the full power of Simpleplot.....in this sense, I find more useful to update Simpleplot than to increase the complexity of %pl, but it just my opinion.....

Quote:

As for log scales, the 3/30/300 look like they might be 'specific labels (but why they have been put there is anyones guess) since they are aligned differently (lower, better) than the major tick labels.


this is what I mean when I say that Simpleplot needs an update.....the way it manages fonts is not quite right......

Quote:

What on earth are these lines like (cut n pasted at random) .....

type(plot), dimension(5) :: curve
newlineWidth = curve(nplot)%LineWidth
curve(nplot)%LineTrace=newLineTrace
curve(nplot)=plot(newLineTrace,newLineWidth,newLineColor)


well, that's Fortran 90.....I defined a derived data type variable in order to group together all the information about each curve.....each variable works like an array that can have many components but unlike an array, the component of a derived data type may have different types (integer, real, character, etc.).......I find this more straightforward and useful than defining arrays for line width, line colour, line type, etc......

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Tue Sep 30, 2014 2:37 pm    Post subject: Reply with quote

Yes, you are right...I did not see that Dan modified his original code and set x(i)=i instead of x(i) = i-1......

Agustin
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 -> Suggestions All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
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