Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include axes lists in heatmap #937

Open
Divisible8737 opened this issue Sep 11, 2024 · 0 comments
Open

Include axes lists in heatmap #937

Divisible8737 opened this issue Sep 11, 2024 · 0 comments

Comments

@Divisible8737
Copy link

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant