JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.84k stars 354 forks source link

How to specify the dynamic range of an input array for heatmap #608

Closed BoundaryValueProblems closed 7 years ago

BoundaryValueProblems commented 7 years ago

Currently, heatmap maps the whole range of values (i.e., from min to max) of an input array to the full range of the colormap by default. I want to map the specific range of values of an input array to the full range of the colormap. Supplying the keyword, e.g., clims=(100,200), is not effective somehow. I am using PlotlyJS as a backend. Isn't clims supposed to do this job? Or is there any other simple way to accomplish this? Thanks for your help! BVPs

BoundaryValueProblems commented 7 years ago

I just want to add that if I use the same heatmap command using the pyplot backend, then it works without any problem. But with the plotlyjs backend, it doesn't. To be concrete, I want to do something like the following:

heatmap(randn(100,100), clims=(-0.1, 0.1), aspect_ratio=1)

Thanks! BVPs

BoundaryValueProblems commented 7 years ago

OK, I should close this issue since I just found the issue #316, which says clims to be implemented. Since this functionality is quite important and it's available with the pyplot backend, I really hope that this is also incorporated in the plotlyjs backend very soon! Best, BVPs