Skip to content

[BUG]Voxel Plot switched axes #501

@faberno

Description

@faberno

Describe the bug
It seems like the x and z axis are switched up in voxel_plot.

https://github.com/waltsims/k-wave-python/blob/d4b8e3c0a7d1cef56564783074d6a522aa9f4813/kwave/utils/plot.py#L38C1-L40C40

See screenshots for a comparison between k-wave-matlab, the current behaviour and the "fixed" behaviour.

Fixed by:

    ax.set_xlim([0.5, sz[0] + 0.5])
    ax.set_ylim([0.5, sz[1] + 0.5])
    ax.set_zlim([0.5, sz[2] + 0.5])

To Reproduce
Run examples which contain the voxel_plot function:

  • at_linear_array_transducer
  • us_defining_transducer

Screenshots
at_linear_array_transducer:
voxelplot_linarray

us_defining_transducer:
voxelPlot_ustransducer

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions