!______________________________________________________________________________ ! This program demonstrates how to use the SimpleGraphics module to plot 2D curves ! It plots the function y=x^2 exactly and with random deviations. !______________________________________________________________________________ PROGRAM DISLIN_test USE SimpleGraphics IMPLICIT NONE INTEGER, PARAMETER :: wp=KIND(0.0E0) INTEGER, PARAMETER :: N=10 INTEGER :: i REAL(KIND=wp), DIMENSION(N) :: X,Y,DELTA,Y_ CHARACTER(50), DIMENSION(2) :: title ! The title of the plot ! This part sets up the arrays to plot ! X and Y=X**2 ! Don't worry about this syntax yet !__________________________________ X=REAL((/(i,i=1,N)/))/N Y=X**2 !__________________________________ ! This is an example of using Plot2D plot: title(1)="Plot of the function y=x^2" ! First line of the title title(2)="A. Donev, 9/28/00" ! Second line of title CALL InitGraphics(file="TestSimple_2D.ps",file_type="CONS", & plot_title=title, & x_label="x",y_label="y") CALL Plot2D(x=X,y=Y,plot_spec="L-R",new_plot=.TRUE.) ! Just a line CALL Plot2D(x=X,y=Y,plot_spec="STB",new_plot=.FALSE.) ! Add symbols as well CALL EndGraphics() END PROGRAM DISLIN_test