fix: restore PDF marker visibility by fixing coordinate transformation (fixes #986) #988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes missing markers in PDF output caused by coordinate transformation regression. Markers were being positioned outside the visible plot area due to aspect ratio preservation logic introduced ~2 weeks ago.
Root Cause
Same underlying issue as PDF scale regression #985:
normalize_to_pdf_coords()common_scale = min(x_scale, y_scale)Technical Fix
Applied same coordinate transformation fix as scale regression:
Modified Functions
normalize_to_pdf_coords(): Restored independent X/Y scalingsafe_coordinate_transform(): Removed aspect ratio preservationKey Changes
Validation
test_missing_markers_986.f90demonstrates issue/fixmarker_demoworks correctly after fixFiles Changed
src/backends/vector/fortplot_pdf_coordinate.f90: Coordinate transformation fixexample/test_missing_markers_986.f90: Regression test for verificationRelationship to Other Issues
This fix resolves the same coordinate transformation bug as #985 (PDF scale regression):
Test Plan
🤖 Generated with Claude Code