-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Saving with a .dat extension does not switch to the ASCII backend. get_backend_from_filename only recognizes .png, .pdf, and .txt, so .dat falls back to PNG.
Steps to Reproduce
- Call
fig%savefig('output.dat')from any existing example (or run the snippet below). - Inspect the resulting file – the PNG backend is still active.
program repro
use fortplot_utils, only: get_backend_from_filename
implicit none
print *, trim(get_backend_from_filename('output.dat'))
end program reproThe program above prints png, confirming the backend detection does not route .dat to the ASCII backend.
Expected Behavior
.dat should select the ASCII backend (same as .txt) so users get the text-friendly output documented in src/documentation/fortplot_documentation.f90.
Additional Context
The docs list .dat among the recognized media extensions, and several verification helpers emit .dat files in test/output/. Restoring ASCII routing keeps the CLI consistent with the documentation.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working