Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions example/test_missing_markers_986.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
program test_missing_markers_986
!! Test to demonstrate missing markers issue #986
!! This test creates scatter plots with markers that should appear in both PNG and PDF
!! but markers may be missing in PDF output

use iso_fortran_env, only: wp => real64
use fortplot_figure, only: figure_t
implicit none

type(figure_t) :: fig
real(wp), parameter :: x_data(6) = [1.0_wp, 2.0_wp, 3.0_wp, 4.0_wp, 5.0_wp, 6.0_wp]
real(wp), parameter :: y_data(6) = [2.0_wp, 4.0_wp, 3.0_wp, 6.0_wp, 5.0_wp, 7.0_wp]

! Create figure
call fig%initialize(800, 600)

! Add scatter plot with different marker styles
call fig%scatter(x_data(1:2), y_data(1:2), marker='o', label='Circle markers')
call fig%scatter(x_data(3:4), y_data(3:4), marker='s', label='Square markers')
call fig%scatter(x_data(5:6), y_data(5:6), marker='^', label='Triangle markers')

call fig%set_title("Missing Markers Test - Issue #986")
call fig%set_xlabel("X values")
call fig%set_ylabel("Y values")
call fig%legend()

! Save both formats for comparison
call fig%save("test_missing_markers_986.pdf") ! May have missing markers
call fig%save("test_missing_markers_986.png") ! Should show markers correctly

print *, "Generated marker test files:"
print *, " test_missing_markers_986.pdf (check for missing markers)"
print *, " test_missing_markers_986.png (reference with markers)"
print *, "Compare to identify if markers are missing in PDF output"

end program test_missing_markers_986
1 change: 0 additions & 1 deletion src/backends/vector/fortplot_pdf_coordinate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ subroutine safe_coordinate_transform(x, y, x_min, x_max, y_min, y_max, &
real(wp), parameter :: EPSILON = 1.0e-10_wp
real(wp) :: x_range, y_range
real(wp) :: x_scale, y_scale

! Calculate ranges with epsilon protection
x_range = x_max - x_min
y_range = y_max - y_min
Expand Down
Loading