safe_coordinate_transform Subroutine

public subroutine safe_coordinate_transform(x, y, x_min, x_max, y_min, y_max, plot_left, plot_width, plot_bottom, plot_height, pdf_x, pdf_y)

Safe coordinate transformation with aspect ratio preservation Updated to maintain correct aspect ratios like normalize_to_pdf_coords

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
real(kind=wp), intent(in) :: x_min
real(kind=wp), intent(in) :: x_max
real(kind=wp), intent(in) :: y_min
real(kind=wp), intent(in) :: y_max
real(kind=wp), intent(in) :: plot_left
real(kind=wp), intent(in) :: plot_width
real(kind=wp), intent(in) :: plot_bottom
real(kind=wp), intent(in) :: plot_height
real(kind=wp), intent(out) :: pdf_x
real(kind=wp), intent(out) :: pdf_y