Skip to content

Include axes lists in heatmap #937

@Divisible8737

Description

@Divisible8737

Is your feature request related to a problem? Please describe.
Nearly 100% of the time when I generate heatmaps, the x and y axes do not have integer values. Instead, they are equispaced lists defined by the scenario, and it is annoying to infer the list value from the figure pixel index when the figure doesn't include appropriately scaled axes.

Describe the solution you'd like
I would like to see two optional arguments to visdom's heatmap(), specifically, I'm hoping the user would be provide optional inputs like

'x':horizontal_axis_vector 
'y':vertical_axis_vector 

So that an example use would be

import visdom
import numpy as np
viz = Visdom()
horizontal_axis_vector= np.arange(-5,6)[np.newaxis]
vertical_axis_vector = (np.arange(0,10)*.2)[np.newaxis]
h = np.square(vertical_axis_vector.T @ horizontal_axis_vector)
viz.heatmap(h, opts={'x':horizontal_axis_vector, 'y':vertical_axis_vector})  

Describe alternatives you've considered
The input-output behavior would be similar to matplotlib's imshow() or matlab's imagesc()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions