

- #Fortran programing tutorial simply fortran how to
- #Fortran programing tutorial simply fortran code
- #Fortran programing tutorial simply fortran series
To experiment, users can start with the code below: program test The complete code to show the example plot is quite terse. In most cases, the calling routine should clean up the plot variable before moving on with the simple call: call destroy_plot(p) CleanupĪfter the window is closed, the user’s program will continue execution. The appearance of the window will obviously differ depending on the platform (the example is from GNU/Linux). The call above will open a window and pause the user’s program execution until closed. Now that the plot is completely configured, we can actually display the plot: call display_plot(p) We could additionally set scaling on the axes, but the default behavior to autoscale the axes should be sufficient in many cases. Our axes should now appear properly labeled. In our case, we can use the following: call set_xlabel(p, "Easy")


Labeling the AxesĪ proper plot should always have labeled axes. The pixel plot, like the scatter plot above, uses points for each datapoint, but the smaller pixel representation might be preferable when a substantial amount of data is being drawn. Another data set can be added and configured similarly, and it would be referenced using 1 as it’s index.ĭepending on the data, the user might prefer to use a line plot, bar chart, or the pixel plot.
#Fortran programing tutorial simply fortran series
Note that the series is refered to as 0 since it is the first data set. To add a label and configure our data to appear in a scatter chart, we would call: call set_serieslabel(p, 0, "Example Data") Ĭall set_seriestype(p, 0, APLOT_STYLE_DOT) As mentioned in the reference section, the numbering for referencing series is zero-based. The data above should now be added to the plot as a series. Adding a Data SetĪplot can produce a handful of two-dimensional plots to visualize user data.
#Fortran programing tutorial simply fortran how to
This short tutorial will show how to run your source code. At this point, the user may want to set up a plot title: call set_title(p, 'Example Plot')Īt this point, no data has been added. With Simply Fortran, compiling and executing a single Fortran source file is quick and easy. The call above creates a plot variable that is used in all subsequent calls to Aplot’s programming interface. The first step in creating a plot is to initialize a plot variable: type(aplot_t)::p Simply Fortran will take care of everything else necessary to include the Aplot library in an executable. Including the ModuleĪplot is accessible via a single Fortran 90 module: use aplot This tutorial is meant to provide the necessary steps for getting started with Aplot. Creating a graph from Fortran using Aplot is simple and easy.
