display
    Display subsystem for tables and plots.
This package contains user-facing facades and backend implementations to render tabular data and plots in different environments.
- Tables: see :mod:
easydiffraction.display.tablesand the engines in :mod:easydiffraction.display.tablers. - Plots: see :mod:
easydiffraction.display.plottingand the engines in :mod:easydiffraction.display.plotters. 
            base
    Common base classes for display components and their factories.
            RendererBase
    
              Bases: SingletonBase, ABC
Base class for display components with pluggable engines.
Subclasses provide a factory and a default engine. This class manages the active backend instance and exposes helpers to inspect supported engines in a table-friendly format.
Source code in src/easydiffraction/display/base.py
                20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86  |  | 
            show_config()
  
      abstractmethod
  
    Display the current renderer configuration.
Source code in src/easydiffraction/display/base.py
              64 65 66 67  |  | 
            show_current_engine()
    Display the currently selected engine.
Source code in src/easydiffraction/display/base.py
              83 84 85 86  |  | 
            show_supported_engines()
    List supported engines with descriptions in a table.
Source code in src/easydiffraction/display/base.py
              69 70 71 72 73 74 75 76 77 78 79 80 81  |  | 
            RendererFactoryBase
    
              Bases: ABC
Base factory that manages discovery and creation of backends.
Source code in src/easydiffraction/display/base.py
                89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135  |  | 
            create(engine_name)
  
      classmethod
  
    Create a backend instance for the given engine.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                engine_name
             | 
            
                  str
             | 
            
               Identifier of the engine to instantiate as
listed in   | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  Any
             | 
            
               A new backend instance corresponding to   | 
          
Raises:
| Type | Description | 
|---|---|
                  ValueError
             | 
            
               If the engine name is not supported.  | 
          
Source code in src/easydiffraction/display/base.py
              92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111  |  | 
            descriptions()
  
      classmethod
  
    Return pairs of engine name and human-friendly description.
Source code in src/easydiffraction/display/base.py
              118 119 120 121 122 123 124  |  | 
            supported_engines()
  
      classmethod
  
    Return a list of supported engine identifiers.
Source code in src/easydiffraction/display/base.py
              113 114 115 116  |  | 
            plotters
    Plotting backends.
This subpackage implements plotting engines used by the high-level plotting facade:
- :mod:
.asciifor terminal-friendly ASCII plots. - :mod:
.plotlyfor interactive plots in notebooks or browsers. 
            ascii
    ASCII plotting backend.
Renders compact line charts in the terminal using
asciichartpy. This backend is well suited for quick feedback in
CLI environments and keeps a consistent API with other plotters.
            AsciiPlotter
    
              Bases: PlotterBase
Terminal-based plotter using ASCII art.
Source code in src/easydiffraction/display/plotters/ascii.py
                24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86  |  | 
            plot(x, y_series, labels, axes_labels, title, height=None)
    Render a compact ASCII chart in the terminal.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                x
             | 
            
               1D array-like of x values (only used for range display).  | 
            required | |
                y_series
             | 
            
               Sequence of y arrays to plot.  | 
            required | |
                labels
             | 
            
               Series identifiers corresponding to y_series.  | 
            required | |
                axes_labels
             | 
            
               Ignored; kept for API compatibility.  | 
            required | |
                title
             | 
            
               Figure title printed above the chart.  | 
            required | |
                height
             | 
            
               Number of text rows to allocate for the chart.  | 
            
                  None
             | 
          
Source code in src/easydiffraction/display/plotters/ascii.py
              46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86  |  | 
            base
    Abstract base and shared constants for plotting backends.
            PlotterBase
    
              Bases: ABC
Abstract base for plotting backends.
Implementations accept x values, multiple y-series, optional labels and render a plot to the chosen medium.
Source code in src/easydiffraction/display/plotters/base.py
                56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83  |  | 
            plot(x, y_series, labels, axes_labels, title, height)
  
      abstractmethod
  
    Render a plot.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                x
             | 
            
               1D array of x-axis values.  | 
            required | |
                y_series
             | 
            
               Sequence of y arrays to plot.  | 
            required | |
                labels
             | 
            
               Identifiers corresponding to y_series.  | 
            required | |
                axes_labels
             | 
            
               Pair of strings for the x and y titles.  | 
            required | |
                title
             | 
            
               Figure title.  | 
            required | |
                height
             | 
            
               Backend-specific height (text rows or pixels).  | 
            required | 
Source code in src/easydiffraction/display/plotters/base.py
              63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83  |  | 
            plotly
    Plotly plotting backend.
Provides an interactive plotting implementation using Plotly. In notebooks, figures are displayed inline; in other environments a browser renderer may be used depending on configuration.
            PlotlyPlotter
    
              Bases: PlotterBase
Interactive plotter using Plotly for notebooks and browsers.
Source code in src/easydiffraction/display/plotters/plotly.py
                32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155  |  | 
            plot(x, y_series, labels, axes_labels, title, height=None)
    Render an interactive Plotly figure.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                x
             | 
            
               1D array-like of x-axis values.  | 
            required | |
                y_series
             | 
            
               Sequence of y arrays to plot.  | 
            required | |
                labels
             | 
            
               Series identifiers corresponding to y_series.  | 
            required | |
                axes_labels
             | 
            
               Pair of strings for the x and y titles.  | 
            required | |
                title
             | 
            
               Figure title.  | 
            required | |
                height
             | 
            
               Ignored; Plotly auto-sizes based on renderer.  | 
            
                  None
             | 
          
Source code in src/easydiffraction/display/plotters/plotly.py
              66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155  |  | 
            plotting
    Plotting facade for measured and calculated patterns.
Uses the common :class:RendererBase so plotters and tablers share a
consistent configuration surface and engine handling.
            Plotter
    
              Bases: RendererBase
User-facing plotting facade backed by concrete plotters.
Source code in src/easydiffraction/display/plotting.py
                50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423  |  | 
            height
  
      property
      writable
  
    Plot height (rows for ASCII, pixels for Plotly).
            plot_calc(pattern, expt_name, expt_type, x_min=None, x_max=None, d_spacing=False)
    Plot calculated pattern using the current engine.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
               Object with   | 
            required | |
                expt_name
             | 
            
               Experiment name for the title.  | 
            required | |
                expt_type
             | 
            
               Experiment type with scattering/beam enums.  | 
            required | |
                x_min
             | 
            
               Optional minimum x-axis limit.  | 
            
                  None
             | 
          |
                x_max
             | 
            
               Optional maximum x-axis limit.  | 
            
                  None
             | 
          |
                d_spacing
             | 
            
               If   | 
            
                  False
             | 
          
Source code in src/easydiffraction/display/plotting.py
              217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296  |  | 
            plot_meas(pattern, expt_name, expt_type, x_min=None, x_max=None, d_spacing=False)
    Plot measured pattern using the current engine.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
               Object with   | 
            required | |
                expt_name
             | 
            
               Experiment name for the title.  | 
            required | |
                expt_type
             | 
            
               Experiment type with scattering/beam enums.  | 
            required | |
                x_min
             | 
            
               Optional minimum x-axis limit.  | 
            
                  None
             | 
          |
                x_max
             | 
            
               Optional maximum x-axis limit.  | 
            
                  None
             | 
          |
                d_spacing
             | 
            
               If   | 
            
                  False
             | 
          
Source code in src/easydiffraction/display/plotting.py
              135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215  |  | 
            plot_meas_vs_calc(pattern, expt_name, expt_type, x_min=None, x_max=None, show_residual=False, d_spacing=False)
    Plot measured and calculated series and optional residual.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
               Object with   | 
            required | |
                expt_name
             | 
            
               Experiment name for the title.  | 
            required | |
                expt_type
             | 
            
               Experiment type with scattering/beam enums.  | 
            required | |
                x_min
             | 
            
               Optional minimum x-axis limit.  | 
            
                  None
             | 
          |
                x_max
             | 
            
               Optional maximum x-axis limit.  | 
            
                  None
             | 
          |
                show_residual
             | 
            
               If   | 
            
                  False
             | 
          |
                d_spacing
             | 
            
               If   | 
            
                  False
             | 
          
Source code in src/easydiffraction/display/plotting.py
              298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393  |  | 
            show_config()
    Display the current plotting configuration.
Source code in src/easydiffraction/display/plotting.py
              69 70 71 72 73 74 75 76 77 78 79 80 81 82  |  | 
            x_max
  
      property
      writable
  
    Maximum x-axis limit.
            x_min
  
      property
      writable
  
    Minimum x-axis limit.
            PlotterEngineEnum
    
              Bases: str, Enum
Source code in src/easydiffraction/display/plotting.py
                28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47  |  | 
            default()
  
      classmethod
  
    Select default engine based on environment.
Source code in src/easydiffraction/display/plotting.py
              32 33 34 35 36 37 38 39  |  | 
            description()
    Human-readable description for UI listings.
Source code in src/easydiffraction/display/plotting.py
              41 42 43 44 45 46 47  |  | 
            PlotterFactory
    
              Bases: RendererFactoryBase
Factory for plotter implementations.
Source code in src/easydiffraction/display/plotting.py
                426 427 428 429 430 431 432 433 434 435 436 437 438 439 440  |  | 
            tablers
    Tabular rendering backends.
This subpackage provides concrete implementations for rendering tables in different environments:
- :mod:
.richfor terminal and notebooks using the Rich library. - :mod:
.pandasfor notebooks using DataFrame Styler. 
            base
    Low-level backends for rendering tables.
This module defines the abstract base for tabular renderers and small helpers for consistent styling across terminal and notebook outputs.
            TableBackendBase
    
              Bases: ABC
Abstract base class for concrete table backends.
Subclasses implement the render method which receives an
index-aware pandas DataFrame and the alignment for each column
header.
Source code in src/easydiffraction/display/tablers/base.py
                20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109  |  | 
            render(alignments, df, display_handle=None)
  
      abstractmethod
  
    Render the provided DataFrame with backend-specific styling.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                alignments
             | 
            
               Iterable of column justifications (e.g.,
  | 
            required | |
                df
             | 
            
               Index-aware DataFrame with data to render.  | 
            required | |
                display_handle
             | 
            
                  Any | None
             | 
            
               Optional environment-specific handle to enable in-place updates.  | 
            
                  None
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Any
             | 
            
               Backend-defined return value (commonly   | 
          
Source code in src/easydiffraction/display/tablers/base.py
              89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109  |  | 
            pandas
    Pandas-based table renderer for notebooks using DataFrame Styler.
            PandasTableBackend
    
              Bases: TableBackendBase
Render tables using the pandas Styler in Jupyter environments.
Source code in src/easydiffraction/display/tablers/pandas.py
                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169  |  | 
            render(alignments, df, display_handle=None)
    Render a styled DataFrame.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                alignments
             | 
            
               Iterable of column justifications (e.g. 'left').  | 
            required | |
                df
             | 
            
               DataFrame whose index is displayed as the first column.  | 
            required | |
                display_handle
             | 
            
                  Any | None
             | 
            
               Optional IPython DisplayHandle to update an existing output area in place when running in Jupyter.  | 
            
                  None
             | 
          
Source code in src/easydiffraction/display/tablers/pandas.py
              153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169  |  | 
            rich
    Rich-based table renderer for terminals and notebooks.
            RichTableBackend
    
              Bases: TableBackendBase
Render tables to terminal or Jupyter using the Rich library.
Source code in src/easydiffraction/display/tablers/rich.py
                40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153  |  | 
            render(alignments, df, display_handle=None)
    Render a styled table using Rich.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                alignments
             | 
            
               Iterable of text-align values for columns.  | 
            required | |
                df
             | 
            
               Index-aware DataFrame to render.  | 
            required | |
                display_handle
             | 
            
               Optional environment handle for in-place updates.  | 
            
                  None
             | 
          
Source code in src/easydiffraction/display/tablers/rich.py
              137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153  |  | 
            tables
    Table rendering engines: console (Rich) and Jupyter (pandas).
            TableEngineEnum
    
              Bases: str, Enum
Source code in src/easydiffraction/display/tables.py
                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42  |  | 
            default()
  
      classmethod
  
    Select default engine based on environment.
Returns Pandas when running in Jupyter, otherwise Rich.
Source code in src/easydiffraction/display/tables.py
              25 26 27 28 29 30 31 32 33 34 35  |  | 
            TableRenderer
    
              Bases: RendererBase
Renderer for tabular data with selectable engines (singleton).
Source code in src/easydiffraction/display/tables.py
                45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93  |  | 
            render(df, display_handle=None)
    Render a DataFrame as a table using the active backend.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                df
             | 
            
               DataFrame with a two-level column index where the second level provides per-column alignment.  | 
            required | |
                display_handle
             | 
            
                  Any | None
             | 
            
               Optional environment-specific handle used to update an existing output area in-place (e.g., an IPython DisplayHandle or a terminal live handle).  | 
            
                  None
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Any
             | 
            
               Backend-specific return value (usually   | 
          
Source code in src/easydiffraction/display/tables.py
              68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93  |  | 
            show_config()
    Display minimal configuration for this renderer.
Source code in src/easydiffraction/display/tables.py
              57 58 59 60 61 62 63 64 65 66  |  | 
            TableRendererFactory
    
              Bases: RendererFactoryBase
Factory for creating tabler instances.
Source code in src/easydiffraction/display/tables.py
                96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118  |  | 
            utils
    
            JupyterScrollManager
    Ensures that Jupyter output cells are not scrollable (applied once).
Source code in src/easydiffraction/display/utils.py
                20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  |  | 
            disable_jupyter_scroll()
  
      classmethod
  
    Inject CSS to prevent output cells from being scrollable.
Source code in src/easydiffraction/display/utils.py
              27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48  |  |