Skip to main content

PLPlot example 3

This example shows how to plot a graph by using [[PLPlot_]].

Modules and classes

  • [[PLPlot_]]

Usage

IMPORT modules and declare variables

PROGRAM main
use easifemBase
use easifemClasses
implicit none
real( DFP ), allocatable :: x( : ), y( : )
type( PLPlot_ ) :: obj

!!! note "" Prepare data to be plotted.

  x = linspace( 0.0_DFP, 1.0_DFP, 101 )
y = x**2

!!! note "svg" LinePlot method

  CALL obj%LinePlot( x=x, y=y, filename="test_3.svg", &
& )
END PROGRAM main