Skip to content

[FR] Interpolation does not work for the heatmap in Plots.jl #2857

@songhanzhang

Description

@songhanzhang

I wish to draw a heatmap for a stress field, and a linear interpolation is preferred (such like the "shading interp" in Matlab) in order to present a smooth distribution. After searching around, I haven't found a helpful answer.

I noticed an earlier issue, where the interpolation is involved in the heatmap automatically.

interp_1

But unfortunately, I cannot produce the result by using the same code:

z = reshape(1:25,5,5)
heatmap(z)

Instead, the result is as below:

interp_2

I have tried

heatmap(z, interpolation = true)
heatmap(z, interpolation = :linear)

and so on, but none of them works.

So, can anyone please tell me how to draw a heatmap with interpolation? Thank you!

Version information:

Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementimproving existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions