File:Rpalette.png

From 太極
Jump to navigation Jump to search

Original file(534 × 615 pixels, file size: 28 KB, MIME type: image/png)

Summary

pal <- palette()
# [1] "black"   "#DF536B" "#61D04F" "#2297E6" "#28E2E5" "#CD0BBC" "#F5C710"
# [8] "gray62"
pal_matrix <- matrix(seq_along(pal), nr=1)
image(pal_matrix, col = pal, axes = FALSE)
# 8 rows, 1 column, but no labeling
# Starting from bottom, left.

par()$usr  # change with the data dim
text(0, (par()$usr[4]-par()$usr[3])/8*c(0:7), 
     labels = pal)

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:08, 10 May 2023Thumbnail for version as of 11:08, 10 May 2023534 × 615 (28 KB)Brb (talk | contribs)<syntaxhighlight lang='rsplus'> pal <- palette() # [1] "black" "#DF536B" "#61D04F" "#2297E6" "#28E2E5" "#CD0BBC" "#F5C710" # [8] "gray62" pal_matrix <- matrix(seq_along(pal), nr=1) image(pal_matrix, col = pal, axes = FALSE) # 8 rows, 1 column, but no labeling # Starting from bottom, left. par()$usr # change with the data dim text(0, (par()$usr[4]-par()$usr[3])/8*c(0:7), labels = pal) </syntaxhighlight>

The following page uses this file: