Text annotation demonstration for fortplot
This example demonstrates all the key text annotation features: - Basic text placement at specified coordinates - Text annotations with arrows pointing to data points - Font size and color customization - Text rotation support - Background boxes for text - Multiple text alignment options - Different coordinate systems (data, figure, axis)
The example creates a plot with various data features and annotates them to demonstrate scientific figure preparation capabilities.
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
integer, | parameter | :: | n | = | 100 | |
real(kind=wp) | :: | x(n) | ||||
real(kind=wp) | :: | y_sin(n) | ||||
real(kind=wp) | :: | y_exp(n) | ||||
real(kind=wp) | :: | y_quad(n) | ||||
real(kind=wp) | :: | x_max | ||||
real(kind=wp) | :: | y_max_sin | ||||
real(kind=wp) | :: | x_min | ||||
real(kind=wp) | :: | y_min_exp | ||||
integer | :: | i | ||||
integer | :: | max_idx | ||||
integer | :: | min_idx | ||||
type(figure_t) | :: | fig |
Simple number formatting for annotations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | value |