Core operations implementations extracted from fortplot_figure_core
This module contains the actual implementations of core figure operations
that were previously inline procedures in the main core module.
EXTRACTED OPERATIONS:
- initialize: Figure initialization with backend setup
- add_plot: Basic line plotting functionality
- add_contour: Contour plot creation
- add_contour_filled: Filled contour plots
- add_pcolormesh: Pseudocolor mesh plotting
- streamplot: Streamline visualization
- savefig variants: File output operations
- show: Figure display operations
          
      
      
        
          Subroutines
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | streamlines(:) |  | 
        
            | type(subplot_data_t), | intent(inout), |  | allocatable | :: | subplots_array(:,:) |  | 
        
            | integer, | intent(inout) |  |  | :: | subplot_rows |  | 
        
            | integer, | intent(inout) |  |  | :: | subplot_cols |  | 
        
            | integer, | intent(inout) |  |  | :: | current_subplot |  | 
        
            | character(len=:), | intent(inout), |  | allocatable | :: | title |  | 
        
            | character(len=:), | intent(inout), |  | allocatable | :: | xlabel |  | 
        
            | character(len=:), | intent(inout), |  | allocatable | :: | ylabel |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
        
            | integer, | intent(in), | optional |  | :: | width |  | 
        
            | integer, | intent(in), | optional |  | :: | height |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | backend |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | y(:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | label |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | linestyle |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | color(3) |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x_grid(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | y_grid(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | z_grid(:,:) |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | levels(:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | label |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x_grid(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | y_grid(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | z_grid(:,:) |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | levels(:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | colormap |  | 
        
            | logical, | intent(in), | optional |  | :: | show_colorbar |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | label |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x_grid(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | y_grid(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | z_grid(:,:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | label |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | colormap |  | 
        
            | logical, | intent(in), | optional |  | :: | show_colorbar |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | alpha |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | edgecolor(3) |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | linewidth |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | y(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | c(:,:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | colormap |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | vmin |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | vmax |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | edgecolors(3) |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | linewidths |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | upper(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | lower(:) |  | 
        
            | logical, | intent(in), | optional |  | :: | mask(:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | color_string |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | alpha |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | values(:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | labels(:) |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | autopct |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | startangle |  | 
        
            | character(len=*), | intent(in), | optional |  | :: | colors(:) |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | explode(:) |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | integer, | intent(inout) |  |  | :: | plot_count |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | x(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | y(:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | u(:,:) |  | 
        
            | real(kind=wp), | intent(in) |  |  | :: | v(:,:) |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | density |  | 
        
            | real(kind=wp), | intent(in), | optional |  | :: | color(3) |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | integer, | intent(in) |  |  | :: | plot_count |  | 
        
            | character(len=*), | intent(in) |  |  | :: | filename |  | 
        
            | logical, | intent(in), | optional |  | :: | blocking |  | 
        
            | type(text_annotation_t), | intent(inout), |  | allocatable | :: | annotations(:) |  | 
        
            | integer, | intent(in) |  |  | :: | annotation_count |  | 
        
            | type(subplot_data_t), | intent(in), | optional |  | :: | subplots_array(:,:) |  | 
        
            | integer, | intent(in), | optional |  | :: | subplot_rows |  | 
        
            | integer, | intent(in), | optional |  | :: | subplot_cols |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | integer, | intent(in) |  |  | :: | plot_count |  | 
        
            | character(len=*), | intent(in) |  |  | :: | filename |  | 
        
            | integer, | intent(out) |  |  | :: | status |  | 
        
            | logical, | intent(in), | optional |  | :: | blocking |  | 
        
            | type(text_annotation_t), | intent(inout), |  | allocatable | :: | annotations(:) |  | 
        
            | integer, | intent(in) |  |  | :: | annotation_count |  | 
        
            | type(subplot_data_t), | intent(in), | optional |  | :: | subplots_array(:,:) |  | 
        
            | integer, | intent(in), | optional |  | :: | subplot_rows |  | 
        
            | integer, | intent(in), | optional |  | :: | subplot_cols |  | 
    
  
     
   
              
    
    
          
  
  Arguments
      
    
      
        | Type | Intent | Optional | Attributes |  | Name |  | 
    
        
            | type(figure_state_t), | intent(inout) |  |  | :: | state |  | 
        
            | type(plot_data_t), | intent(inout), |  | allocatable | :: | plots(:) |  | 
        
            | integer, | intent(in) |  |  | :: | plot_count |  | 
        
            | logical, | intent(in), | optional |  | :: | blocking |  | 
        
            | type(text_annotation_t), | intent(inout), |  | allocatable | :: | annotations(:) |  | 
        
            | integer, | intent(in) |  |  | :: | annotation_count |  | 
        
            | type(subplot_data_t), | intent(in), | optional |  | :: | subplots_array(:,:) |  | 
        
            | integer, | intent(in), | optional |  | :: | subplot_rows |  | 
        
            | integer, | intent(in), | optional |  | :: | subplot_cols |  |