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

Track Heatmap cmap Customization #53

Open
MattFill opened this issue Jan 25, 2024 · 2 comments
Open

Track Heatmap cmap Customization #53

MattFill opened this issue Jan 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MattFill
Copy link

Hello,

Is it possible to adjust the vmin or vmax to a value below/above the min and max values of the data?

I get an error like this when I try and I'm wondering if there is a workaround:
ValueError: value=0.13 is not in valid range (vmin=-0.18, vmax=0.097)

Also is it possible to set a center value to anchor the colors around? Similar to the functionality in seaborns heatmap.

Thanks

@moshi4
Copy link
Owner

moshi4 commented Jan 27, 2024

Hi @MattFill,

Both of these are not possible with pyCirclize at this time. A solution may be considered in a future release.

@MattFill
Copy link
Author

MattFill commented Jan 28, 2024

Thanks for the update, @moshi4.

I was able to work around the error by commenting out the following line in track.py:

    # Calculate radius & x position range list of heatmap rectangle
    data_row_num, data_col_num = data.shape
    unit_r_size = self.r_plot_size / data_row_num
    unit_x_size = (end - start) / data_col_num
    # self._check_value_min_max(data, vmin, vmax) <----- 

@moshi4 moshi4 added the enhancement New feature or request label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants