nevo.utils.visualisation

Visualisation Utilities

Tools for visualising NEVO optimisation results.

setup_plotting_style(fontsize=12)[source]

Set up publication-quality plotting style.

Parameters:

fontsize (int) – Base font size for plots

plot_optimisation_results(optimiser, optimum=None, title=None, save_path=None, show_legend=True)[source]

Create comprehensive visualisation of optimisation results.

Parameters:
  • optimiser (NEVOptimiser) – Optimiser instance after running

  • optimum (float, optional) – Known optimal fitness value (for error computation)

  • title (str, optional) – Plot title

  • save_path (str, optional) – Path to save figure

plot_operator_statistics(optimiser, save_path=None, show_legend=True)[source]

Plot operator usage and performance statistics.

Parameters:
  • optimiser (NEVOptimiser) – Optimiser instance after running

  • save_path (str, optional) – Path to save figure

generate_particle_svg(text, output_svg='neuroptim_particles.svg', num_particles=10000, radius=0.5, fill_colour='#1e4c15', font_size=100, font_path=None, padding=20, blur_radius=2, min_probability=0.0, curl_particles=1000)[source]

Generate an SVG with particles sampled to form text.

Particles are distributed with higher density inside the letters and a smooth circular falloff outside, creating a natural scattered effect. If the text contains the uppercase letter ‘O’, subtle spiral trajectories will be added, representing particles being attracted towards it.

Parameters:
  • text (str) – The text string to render as particles

  • output_svg (str) – Output SVG file path

  • num_particles (int) – Total number of particles to generate

  • radius (float) – Fixed particle radius

  • fill_colour (str) – SVG fill colour for particles

  • font_size (int) – Font size for rendering the text

  • font_path (str, optional) – Path to a TrueType font file. If None, uses a serif font

  • padding (int) – Padding around the text in pixels (allows particles to scatter outside)

  • blur_radius (int) – Radius for the circular windowing to smooth probability transition

  • min_probability (float) – Minimum probability outside the letter area (0 to 1)

  • curl_particles (int) – Number of particles to use for the curl attractor trajectories (letter O)

Returns:

Path to the saved SVG file

Return type:

str