fortplot_matplotlib_axes Module

Axes, scale, and labelling helpers for the matplotlib facade



Interfaces

public interface axis

Set aspect ratio: axis('equal'), axis('auto'), or axis(2.0)

  • private subroutine axis_str(aspect)

    Set axis aspect ratio using string mode: equal or auto

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: aspect
  • private subroutine axis_num(ratio)

    Set axis aspect ratio using numeric value (y-scale = ratio * x-scale)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: ratio

Functions

public function get_active_axis() result(axis_name)

Arguments

None

Return Value character(len=10)


Subroutines

public subroutine xlabel(label_text)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: label_text

public subroutine ylabel(label_text)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: label_text

public subroutine title(title_text)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: title_text

public subroutine suptitle(title_text, fontsize)

Set a centered figure-level title above all subplots

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: title_text
real(kind=wp), intent(in), optional :: fontsize

public subroutine legend(position, box, fontsize)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: position
logical, intent(in), optional :: box
integer, intent(in), optional :: fontsize

public subroutine grid(enabled, which, axis, alpha, linestyle)

Arguments

Type IntentOptional Attributes Name
logical, intent(in), optional :: enabled
character(len=*), intent(in), optional :: which
character(len=*), intent(in), optional :: axis
real(kind=wp), intent(in), optional :: alpha
character(len=*), intent(in), optional :: linestyle

public subroutine xlim(xmin, xmax)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: xmin
real(kind=wp), intent(in) :: xmax

public subroutine ylim(ymin, ymax)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: ymin
real(kind=wp), intent(in) :: ymax

public subroutine set_xscale(scale, threshold)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: scale
real(kind=wp), intent(in), optional :: threshold

public subroutine set_yscale(scale, threshold)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: scale
real(kind=wp), intent(in), optional :: threshold

public subroutine set_line_width(width)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: width

public subroutine set_ydata(ydata)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: ydata(:)

public subroutine use_axis(axis_name)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: axis_name

public subroutine minorticks_on()

Enable minor ticks on both axes (matplotlib-compatible)

Arguments

None

public subroutine tight_layout(pad, w_pad, h_pad)

Automatically adjust subplot parameters to give specified padding

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), optional :: pad
real(kind=wp), intent(in), optional :: w_pad
real(kind=wp), intent(in), optional :: h_pad