Add comprehensive Fortran docstrings to all public procedures in src/fortplot.f90 to improve API documentation and usability.
Based on existing patterns in the codebase and FORD documentation standards:
subroutine procedure_name(arg1, arg2, arg3)
    !! Brief description of the procedure
    !!
    !! Detailed description explaining the purpose, behavior,
    !! and any important implementation details.
    !!
    !! Arguments:
    !!   arg1: Description of first argument [units/range]
    !!   arg2: Description of second argument (optional)
    !!   arg3: Description with valid values ('option1', 'option2')
    !!
    !! Examples:
    !!   ! Basic usage example
    !!   call procedure_name(x, y)
    !!   
    !!   ! Advanced usage with options
    !!   call procedure_name(x, y, arg3='option2')
    !!
    !! Notes:
    !!   - Important usage notes or caveats
    !!   - Performance considerations
    !!
    !! See Also:
    !!   related_procedure, other_procedure
Should be concise and action-oriented
Detailed Description (for complex procedures)
Use cases and context
Arguments Section (mandatory)
List valid options for string arguments
Examples Section (for key procedures)
Use realistic variable names
Notes Section (when needed)
Important limitations or caveats
See Also Section (for related procedures)
Complete documentation with examples needed:
Need complete documentation:
Need enhancement:
Mirror documentation from primary functions:
Priority: HIGH - Focus on most-used functions first - Use scatter documentation as template - Include practical examples - Document all optional arguments
Priority: MEDIUM
- Document backend auto-detection in savefig
- Explain blocking parameter behavior
- Document viewer functionality
Priority: MEDIUM - Document LaTeX support where applicable - List all valid location options for legend - Document scale types (linear, log, symlog)
Priority: LOW - Reference main function documentation - Note differences if any - Keep consistent with primary functions
Priority: LOW - Focus on user-facing utilities - Document internal helpers minimally
subroutine plot(x, y, label, linestyle)
    !! Add a line plot to the global figure (pyplot-fortran compatible)
    !!
    !! Creates a 2D line plot with optional styling. Supports both
    !! matplotlib-style format strings and explicit style parameters.
    !!
    !! Arguments:
    !!   x: X-axis data array
    !!   y: Y-axis data array (same size as x)
    !!   label: Legend label for this plot (optional)
    !!   linestyle: Format string for line and marker style (optional)
    !!             Supports matplotlib format: '[color][marker][line]'
    !!             Examples: 'r-' (red solid), 'b--o' (blue dashed with circles),
    !!                      'g:' (green dotted), 'ko' (black circles only)
    !!
    !! Examples:
    !!   ! Basic line plot
    !!   call plot(x, y)
    !!   
    !!   ! Plot with label for legend
    !!   call plot(x, y, label='Temperature')
    !!   
    !!   ! Red dashed line with square markers
    !!   call plot(x, y, label='Data', linestyle='r--s')
    !!
    !! Notes:
    !!   - Automatically initializes global figure if needed
    !!   - Use savefig() to save or show() to display
    !!
    !! See Also:
    !!   add_plot, scatter, errorbar
subroutine savefig(filename, blocking)
    !! Save the global figure to file (backend auto-detected from extension)
    !!
    !! Automatically selects the appropriate backend based on file extension.
    !! Supports PNG, PDF, and ASCII text formats.
    !!
    !! Arguments:
    !!   filename: Output filename with extension
    !!            '.png' - Raster image (default)
    !!            '.pdf' - Vector graphics
    !!            '.txt' - ASCII art representation
    !!   blocking: Wait for user input after save (optional, default: false)
    !!            Useful for keeping plot windows open
    !!
    !! Examples:
    !!   ! Save as PNG image
    !!   call savefig('plot.png')
    !!   
    !!   ! Save as PDF and wait for user
    !!   call savefig('figure.pdf', blocking=.true.)
    !!   
    !!   ! Save as ASCII art
    !!   call savefig('chart.txt')
    !!
    !! Notes:
    !!   - PNG backend requires zlib support
    !!   - PDF backend generates vector graphics
    !!   - ASCII backend works in terminal environments
    !!   - File is overwritten if it exists
Mitigation: Add documentation tests to verify examples compile
Over-Documentation (LOW)
Mitigation: Use examples instead of lengthy descriptions
Inconsistent Style (LOW)
Mitigation: File separate issues for improvements
Time Estimation (LOW)
Arguments section with all parameters documented
Core plotting functions have:
Notes on backend-specific behavior
Documentation follows consistent format across all procedures
Examples are tested and working
Cross-references help users discover related functionality
Create test program that exercises all examples
Documentation Generation
Check generated HTML documentation
User Testing
Total Estimate: 7 hours