Scale axes in heatmap/plot

I want to plot the magnitude of the values of a certain function with complex arguments. Thus, I created two LinRanges (for real and imaginary part) and fed the function with it to obtain a matrix.
Now I plotted the function with a heatmap.

Problem: the label of the xaxis and yaxis are from 1:size(LinRange,1) (in my example i.e. 1:100) but I want them to run from the actual values, i.e. e.g.

  • x-axis: [0.01,5] (real part of the argument)
  • y-axis: [-0.01,-0.3] (imaginary part of the argument)

I guess I somehow had to rescale the axes in a certain manner but I cannot find which command does the trick. Could anyone pls help me out?

You can use the xticks keyword, I think, with:

xticks=(1:1:20, yourlabelslist)

There is one use this here, although not for heatmaps, where the ticks are changed to arbitrary labels, in this case residue names:

1 Like

I think this is what you want:

heatmap(xaxisvalues, yaxisvalues, matrix)