Legend drawing and rendering procedures
Single Responsibility: Legend box drawing, entry rendering, and positioning
Detect whether backend is operating in ASCII mode based on canvas size
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(plot_context), | intent(in) | :: | backend |
Render compact ASCII legend with proper formatting
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(legend_t), | intent(in) | :: | legend | |||
| class(plot_context), | intent(inout) | :: | backend | |||
| real(kind=wp), | intent(in) | :: | legend_x | |||
| real(kind=wp), | intent(in) | :: | legend_y |
Render standard legend for PNG/PDF backends with improved sizing
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(legend_t), | intent(in) | :: | legend | |||
| class(plot_context), | intent(inout) | :: | backend | |||
| real(kind=wp), | intent(in) | :: | legend_x | |||
| real(kind=wp), | intent(in) | :: | legend_y |
Calculate legend position based on backend and position setting
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(legend_t), | intent(in) | :: | legend | |||
| class(plot_context), | intent(in) | :: | backend | |||
| real(kind=wp), | intent(out) | :: | x | |||
| real(kind=wp), | intent(out) | :: | y |