Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

levelplot colorkey misordering #42

Open
@RemziG1984

Description

@RemziG1984

heatmap example

Dear Prof.
The heatmap created with levelplot () has a mismatch between matrix values and color settings. If we run the level plot () function according to the value matrix given, we see that the coloring according to the upper left and lower right values is incorrect. The values should be listed according to the quantiles between 0.05 and 0.95 from left to top and from left to right.

Would you happen to have any suggestions? Thank you in advance for getting back to me.

TCI_F_Av

0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95
0.05 51.90603 41.15698 21.637516 9.159217 2.52495 3.84416 12.74345 32.54244 54.60968 74.11321 82.41291
0.1 38.98860 29.02492 12.708936 4.068339 1.06320 4.93365 14.81912 32.47144 51.53872 67.74479 74.31148
0.2 18.06635 11.36102 2.901141 0.877963 2.62307 8.87300 18.11912 31.23748 44.21075 54.04269 57.39122
0.3 4.28919 1.86453 0.652578 2.962261 6.76700 12.84574 19.83780 28.08459 35.13435 38.81380 38.79247
0.4 1.49172 2.47241 5.759311 9.388603 12.81100 16.68823 20.10419 23.00582 23.84157 21.74203 19.52653
0.5 9.97000 12.00488 15.457736 17.506705 18.68419 19.20211 18.68240 16.82173 12.96507 7.88616 6.12369
0.6 24.84005 25.77251 26.466842 25.344044 23.53869 20.41568 16.34719 11.14186 5.51443 2.30338 4.35990
0.7 40.27005 39.38799 36.182367 31.659495 26.66849 20.18747 13.24825 6.48634 2.20644 4.87813 12.14399
0.8 55.53212 52.50055 45.102599 36.841488 28.57997 18.84142 9.71403 3.40550 3.77959 15.17132 27.72501
0.9 69.11191 63.88943 52.346606 40.179037 28.60337 16.09456 6.06868 3.35836 11.57069 32.13687 48.22728
0.95 76.12480 69.54024 55.418943 40.808630 27.39643 14.01940 4.68975 6.72184 20.79318 45.81371 62.71202

TCI_F_Av_F
Var1 Var2 value
1 0.05 0.05 51.91
2 0.10 0.05 38.99
3 0.20 0.05 18.07
4 0.30 0.05 4.29
5 0.40 0.05 1.49
...
119 0.80 0.95 27.73
120 0.90 0.95 48.23
121 0.95 0.95 62.71

levelplot(x=TCI_F_Av, data = TCI_F_Av, xlab=colnames(data)[1], ylab=colnames(data)[2], main="QQ Overall Averaged TCI Connectedness",
space = "left", region = TRUE, contour=F, pretty = T, cuts = 14,
at=seq(0, foo(max(TCI_F_Av_F[,3])), length=14), colorkey=list(at=seq(0, foo(max(TCI_F_Av_F[,3])), length=14), col=violetreds2),
panel = function(...){
panel.levelplot(...)
panel.abline(h = c(seq(1.5, 11.5, 1)))
panel.abline(v = c(seq(1.5, 11.5, 1)))
panel.text(x=xr, y=yr, TCI_F_Av_F[,3], cex = 0.8, font = 1)},
col.regions=violetreds2) # col.regions=rev(heat.colors(15))) # colorkey -> plot the colorbar


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp