Skip to content

Instrument view: bad fontsize when components are small #452

Open
@jl-wynen

Description

@jl-wynen
import scipp as sc
import scippneutron as scn

da = sc.DataArray(
    sc.zeros(sizes={'row': 2}),
    coords={'position': sc.vectors(dims=['row'], values=[[0.0, 0.2, 0.0], [0.0, 0.25, 0.0]], unit='m')})
sample_settings = {
    'center': events.meta['sample_position'],
    'color': '#000000',
    'wireframe': True,
    'size': sc.vector(value=[0.01, 0.01, 0.01], unit=sc.units.m),
    'type': 'box',
}
scn.instrument_view(da, components={'sample': sample_settings})

gives
Screenshot_20230814_140628

If it's too difficult to auto-scale the font size, an argument to do it manually would also work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions