I am using R to create colour plots as bitmap files. I have created a palette of 256 colours that I want to use, but the resultant output files contain only 12 colours used in dither patterns. The result is the same whether I use bmp() or png(). How can I get the true colours that I specified instead of dither patterns? (making the driver's job easier!) I am using R 1.1.0 for Windows (rw1010). The attached files are:- src256.R Test program to be run by source("src256.R") col_256.R Colour palette read by src256.R col_256.dat Test data representing a 16x16 square image using all 256 colours Rplot.png The resulting bitmap. If anyone can improve on my code in src256.R, then please do so! A further problem is that I cannot reduce the point size of the tick labels (character strings in this case) using any of:- par(cex=0.2) par(cex.axis=0.2) axis(..., cex=0.2, ...) axis(..., cex.axis=0.2, ...) One final observation: in accordance with polymorphism of R, I would prefer the function image() to take a data frame parameter directly, e.g. image(a.df), so there would be no need to extract the row and column names and pass them separately. Unfortunately this cannot be done while retaining backward compatibility because the essential data item is the third parameter not the first. As a messy compromise, perhaps image() could be extended to accept image(,,a.df) where `a.df' is a data frame. Congratulations to all R developers and contributors. Clive Jenkins -------------- next part -------------- source("col_256.R") a <- read.table("col_256.dat", check.names=FALSE) png(width=635, height=635) # 635= 490 49 squares of 10x10 # +1 for the final line # +144 1.5" total margins par(mai=c(1.25,1.25,0.25,0.25)) # par(cex=0.2,cex.axis=0.2) # no effect here, in image, in axis image((1:nrow(a)), (1:ncol(a)), as.matrix(a), c(0,255), col=colours.256, axes=FALSE, xlab="", ylab="", tcl=0) axis(1, c(1:nrow(a)), attr(a, "row.names"), las=2) axis(2, c(1:ncol(a)), attr(a, "names"), las=2) abline(v=c(0:nrow(a)+0.5)) abline(h=c(0:ncol(a)+0.5)) dev.off() -------------- next part -------------- colours.256 <- c( "#6f6f8f", # Col.000: Hue=160 Sat=030 Lum=120 "#6f6f8f", # Col.001: Hue=160 Sat=031 Lum=120 "#6d6d91", # Col.002: Hue=160 Sat=034 Lum=120 "#6b6b93", # Col.003: Hue=160 Sat=038 Lum=120 "#676797", # Col.004: Hue=160 Sat=045 Lum=120 "#63639b", # Col.005: Hue=160 Sat=053 Lum=120 "#5d5da1", # Col.006: Hue=160 Sat=064 Lum=120 "#5757a7", # Col.007: Hue=160 Sat=076 Lum=120 "#4f4faf", # Col.008: Hue=160 Sat=090 Lum=120 "#4747b7", # Col.009: Hue=160 Sat=106 Lum=120 "#3e3ec0", # Col.010: Hue=160 Sat=123 Lum=120 "#3333cb", # Col.011: Hue=160 Sat=143 Lum=120 "#2828d6", # Col.012: Hue=160 Sat=164 Lum=120 "#1b1be3", # Col.013: Hue=160 Sat=188 Lum=120 "#0e0ef0", # Col.014: Hue=160 Sat=213 Lum=120 "#0000ff", # Col.015: Hue=160 Sat=240 Lum=120 "#6f788f", # Col.016: Hue=149 Sat=030 Lum=120 "#6f788f", # Col.017: Hue=149 Sat=031 Lum=120 "#6d7791", # Col.018: Hue=149 Sat=034 Lum=120 "#6b7693", # Col.019: Hue=149 Sat=038 Lum=120 "#677497", # Col.020: Hue=149 Sat=045 Lum=120 "#63729b", # Col.021: Hue=149 Sat=053 Lum=120 "#5d70a1", # Col.022: Hue=149 Sat=064 Lum=120 "#576da7", # Col.023: Hue=149 Sat=076 Lum=120 "#4f69af", # Col.024: Hue=149 Sat=090 Lum=120 "#4766b7", # Col.025: Hue=149 Sat=106 Lum=120 "#3e62c0", # Col.026: Hue=149 Sat=123 Lum=120 "#335dcb", # Col.027: Hue=149 Sat=143 Lum=120 "#2858d6", # Col.028: Hue=149 Sat=164 Lum=120 "#1b52e3", # Col.029: Hue=149 Sat=188 Lum=120 "#0e4cf0", # Col.030: Hue=149 Sat=213 Lum=120 "#0046ff", # Col.031: Hue=149 Sat=240 Lum=120 "#6f818f", # Col.032: Hue=137 Sat=030 Lum=120 "#6f818f", # Col.033: Hue=137 Sat=031 Lum=120 "#6d8291", # Col.034: Hue=137 Sat=034 Lum=120 "#6b8293", # Col.035: Hue=137 Sat=038 Lum=120 "#678397", # Col.036: Hue=137 Sat=045 Lum=120 "#63839b", # Col.037: Hue=137 Sat=053 Lum=120 "#5d84a1", # Col.038: Hue=137 Sat=064 Lum=120 "#5785a7", # Col.039: Hue=137 Sat=076 Lum=120 "#4f86af", # Col.040: Hue=137 Sat=090 Lum=120 "#4787b7", # Col.041: Hue=137 Sat=106 Lum=120 "#3e89c0", # Col.042: Hue=137 Sat=123 Lum=120 "#338acb", # Col.043: Hue=137 Sat=143 Lum=120 "#288cd6", # Col.044: Hue=137 Sat=164 Lum=120 "#1b8ee3", # Col.045: Hue=137 Sat=188 Lum=120 "#0e90f0", # Col.046: Hue=137 Sat=213 Lum=120 "#0092ff", # Col.047: Hue=137 Sat=240 Lum=120 "#6f8a8f", # Col.048: Hue=126 Sat=030 Lum=120 "#6f8b8f", # Col.049: Hue=126 Sat=031 Lum=120 "#6d8c91", # Col.050: Hue=126 Sat=034 Lum=120 "#6b8d93", # Col.051: Hue=126 Sat=038 Lum=120 "#679097", # Col.052: Hue=126 Sat=045 Lum=120 "#63939b", # Col.053: Hue=126 Sat=053 Lum=120 "#5d97a1", # Col.054: Hue=126 Sat=064 Lum=120 "#579ba7", # Col.055: Hue=126 Sat=076 Lum=120 "#4fa0af", # Col.056: Hue=126 Sat=090 Lum=120 "#47a6b7", # Col.057: Hue=126 Sat=106 Lum=120 "#3eadc0", # Col.058: Hue=126 Sat=123 Lum=120 "#33b4cb", # Col.059: Hue=126 Sat=143 Lum=120 "#28bcd6", # Col.060: Hue=126 Sat=164 Lum=120 "#1bc5e3", # Col.061: Hue=126 Sat=188 Lum=120 "#0ecef0", # Col.062: Hue=126 Sat=213 Lum=120 "#00d8ff", # Col.063: Hue=126 Sat=240 Lum=120 "#6f8f8a", # Col.064: Hue=114 Sat=030 Lum=120 "#6f8f8b", # Col.065: Hue=114 Sat=031 Lum=120 "#6d918c", # Col.066: Hue=114 Sat=034 Lum=120 "#6b938d", # Col.067: Hue=114 Sat=038 Lum=120 "#679790", # Col.068: Hue=114 Sat=045 Lum=120 "#639b93", # Col.069: Hue=114 Sat=053 Lum=120 "#5da197", # Col.070: Hue=114 Sat=064 Lum=120 "#57a79b", # Col.071: Hue=114 Sat=076 Lum=120 "#4fafa0", # Col.072: Hue=114 Sat=090 Lum=120 "#47b7a6", # Col.073: Hue=114 Sat=106 Lum=120 "#3ec0ad", # Col.074: Hue=114 Sat=123 Lum=120 "#33cbb4", # Col.075: Hue=114 Sat=143 Lum=120 "#28d6bc", # Col.076: Hue=114 Sat=164 Lum=120 "#1be3c5", # Col.077: Hue=114 Sat=188 Lum=120 "#0ef0ce", # Col.078: Hue=114 Sat=213 Lum=120 "#00ffd8", # Col.079: Hue=114 Sat=240 Lum=120 "#6f8f81", # Col.080: Hue=103 Sat=030 Lum=120 "#6f8f81", # Col.081: Hue=103 Sat=031 Lum=120 "#6d9182", # Col.082: Hue=103 Sat=034 Lum=120 "#6b9382", # Col.083: Hue=103 Sat=038 Lum=120 "#679783", # Col.084: Hue=103 Sat=045 Lum=120 "#639b83", # Col.085: Hue=103 Sat=053 Lum=120 "#5da184", # Col.086: Hue=103 Sat=064 Lum=120 "#57a785", # Col.087: Hue=103 Sat=076 Lum=120 "#4faf86", # Col.088: Hue=103 Sat=090 Lum=120 "#47b787", # Col.089: Hue=103 Sat=106 Lum=120 "#3ec089", # Col.090: Hue=103 Sat=123 Lum=120 "#33cb8a", # Col.091: Hue=103 Sat=143 Lum=120 "#28d68c", # Col.092: Hue=103 Sat=164 Lum=120 "#1be38e", # Col.093: Hue=103 Sat=188 Lum=120 "#0ef090", # Col.094: Hue=103 Sat=213 Lum=120 "#00ff92", # Col.095: Hue=103 Sat=240 Lum=120 "#6f8f78", # Col.096: Hue=091 Sat=030 Lum=120 "#6f8f78", # Col.097: Hue=091 Sat=031 Lum=120 "#6d9177", # Col.098: Hue=091 Sat=034 Lum=120 "#6b9376", # Col.099: Hue=091 Sat=038 Lum=120 "#679774", # Col.100: Hue=091 Sat=045 Lum=120 "#639b72", # Col.101: Hue=091 Sat=053 Lum=120 "#5da170", # Col.102: Hue=091 Sat=064 Lum=120 "#57a76d", # Col.103: Hue=091 Sat=076 Lum=120 "#4faf69", # Col.104: Hue=091 Sat=090 Lum=120 "#47b766", # Col.105: Hue=091 Sat=106 Lum=120 "#3ec062", # Col.106: Hue=091 Sat=123 Lum=120 "#33cb5d", # Col.107: Hue=091 Sat=143 Lum=120 "#28d658", # Col.108: Hue=091 Sat=164 Lum=120 "#1be352", # Col.109: Hue=091 Sat=188 Lum=120 "#0ef04c", # Col.110: Hue=091 Sat=213 Lum=120 "#00ff46", # Col.111: Hue=091 Sat=240 Lum=120 "#6f8f6f", # Col.112: Hue=080 Sat=030 Lum=120 "#6f8f6f", # Col.113: Hue=080 Sat=031 Lum=120 "#6d916d", # Col.114: Hue=080 Sat=034 Lum=120 "#6b936b", # Col.115: Hue=080 Sat=038 Lum=120 "#679767", # Col.116: Hue=080 Sat=045 Lum=120 "#639b63", # Col.117: Hue=080 Sat=053 Lum=120 "#5da15d", # Col.118: Hue=080 Sat=064 Lum=120 "#57a757", # Col.119: Hue=080 Sat=076 Lum=120 "#4faf4f", # Col.120: Hue=080 Sat=090 Lum=120 "#47b747", # Col.121: Hue=080 Sat=106 Lum=120 "#3ec03e", # Col.122: Hue=080 Sat=123 Lum=120 "#33cb33", # Col.123: Hue=080 Sat=143 Lum=120 "#28d628", # Col.124: Hue=080 Sat=164 Lum=120 "#1be31b", # Col.125: Hue=080 Sat=188 Lum=120 "#0ef00e", # Col.126: Hue=080 Sat=213 Lum=120 "#00ff00", # Col.127: Hue=080 Sat=240 Lum=120 "#788f6f", # Col.128: Hue=069 Sat=030 Lum=120 "#788f6f", # Col.129: Hue=069 Sat=031 Lum=120 "#77916d", # Col.130: Hue=069 Sat=034 Lum=120 "#76936b", # Col.131: Hue=069 Sat=038 Lum=120 "#749767", # Col.132: Hue=069 Sat=045 Lum=120 "#729b63", # Col.133: Hue=069 Sat=053 Lum=120 "#70a15d", # Col.134: Hue=069 Sat=064 Lum=120 "#6da757", # Col.135: Hue=069 Sat=076 Lum=120 "#69af4f", # Col.136: Hue=069 Sat=090 Lum=120 "#66b747", # Col.137: Hue=069 Sat=106 Lum=120 "#62c03e", # Col.138: Hue=069 Sat=123 Lum=120 "#5dcb33", # Col.139: Hue=069 Sat=143 Lum=120 "#58d628", # Col.140: Hue=069 Sat=164 Lum=120 "#52e31b", # Col.141: Hue=069 Sat=188 Lum=120 "#4cf00e", # Col.142: Hue=069 Sat=213 Lum=120 "#46ff00", # Col.143: Hue=069 Sat=240 Lum=120 "#818f6f", # Col.144: Hue=057 Sat=030 Lum=120 "#818f6f", # Col.145: Hue=057 Sat=031 Lum=120 "#82916d", # Col.146: Hue=057 Sat=034 Lum=120 "#82936b", # Col.147: Hue=057 Sat=038 Lum=120 "#839767", # Col.148: Hue=057 Sat=045 Lum=120 "#839b63", # Col.149: Hue=057 Sat=053 Lum=120 "#84a15d", # Col.150: Hue=057 Sat=064 Lum=120 "#85a757", # Col.151: Hue=057 Sat=076 Lum=120 "#86af4f", # Col.152: Hue=057 Sat=090 Lum=120 "#87b747", # Col.153: Hue=057 Sat=106 Lum=120 "#89c03e", # Col.154: Hue=057 Sat=123 Lum=120 "#8acb33", # Col.155: Hue=057 Sat=143 Lum=120 "#8cd628", # Col.156: Hue=057 Sat=164 Lum=120 "#8ee31b", # Col.157: Hue=057 Sat=188 Lum=120 "#90f00e", # Col.158: Hue=057 Sat=213 Lum=120 "#92ff00", # Col.159: Hue=057 Sat=240 Lum=120 "#8a8f6f", # Col.160: Hue=046 Sat=030 Lum=120 "#8b8f6f", # Col.161: Hue=046 Sat=031 Lum=120 "#8c916d", # Col.162: Hue=046 Sat=034 Lum=120 "#8d936b", # Col.163: Hue=046 Sat=038 Lum=120 "#909767", # Col.164: Hue=046 Sat=045 Lum=120 "#939b63", # Col.165: Hue=046 Sat=053 Lum=120 "#97a15d", # Col.166: Hue=046 Sat=064 Lum=120 "#9ba757", # Col.167: Hue=046 Sat=076 Lum=120 "#a0af4f", # Col.168: Hue=046 Sat=090 Lum=120 "#a6b747", # Col.169: Hue=046 Sat=106 Lum=120 "#adc03e", # Col.170: Hue=046 Sat=123 Lum=120 "#b4cb33", # Col.171: Hue=046 Sat=143 Lum=120 "#bcd628", # Col.172: Hue=046 Sat=164 Lum=120 "#c5e31b", # Col.173: Hue=046 Sat=188 Lum=120 "#cef00e", # Col.174: Hue=046 Sat=213 Lum=120 "#d8ff00", # Col.175: Hue=046 Sat=240 Lum=120 "#8f8a6f", # Col.176: Hue=034 Sat=030 Lum=120 "#8f8b6f", # Col.177: Hue=034 Sat=031 Lum=120 "#918c6d", # Col.178: Hue=034 Sat=034 Lum=120 "#938d6b", # Col.179: Hue=034 Sat=038 Lum=120 "#979067", # Col.180: Hue=034 Sat=045 Lum=120 "#9b9363", # Col.181: Hue=034 Sat=053 Lum=120 "#a1975d", # Col.182: Hue=034 Sat=064 Lum=120 "#a79b57", # Col.183: Hue=034 Sat=076 Lum=120 "#afa04f", # Col.184: Hue=034 Sat=090 Lum=120 "#b7a647", # Col.185: Hue=034 Sat=106 Lum=120 "#c0ad3e", # Col.186: Hue=034 Sat=123 Lum=120 "#cbb433", # Col.187: Hue=034 Sat=143 Lum=120 "#d6bc28", # Col.188: Hue=034 Sat=164 Lum=120 "#e3c51b", # Col.189: Hue=034 Sat=188 Lum=120 "#f0ce0e", # Col.190: Hue=034 Sat=213 Lum=120 "#ffd800", # Col.191: Hue=034 Sat=240 Lum=120 "#8f816f", # Col.192: Hue=023 Sat=030 Lum=120 "#8f816f", # Col.193: Hue=023 Sat=031 Lum=120 "#91826d", # Col.194: Hue=023 Sat=034 Lum=120 "#93826b", # Col.195: Hue=023 Sat=038 Lum=120 "#978367", # Col.196: Hue=023 Sat=045 Lum=120 "#9b8363", # Col.197: Hue=023 Sat=053 Lum=120 "#a1845d", # Col.198: Hue=023 Sat=064 Lum=120 "#a78557", # Col.199: Hue=023 Sat=076 Lum=120 "#af864f", # Col.200: Hue=023 Sat=090 Lum=120 "#b78747", # Col.201: Hue=023 Sat=106 Lum=120 "#c0893e", # Col.202: Hue=023 Sat=123 Lum=120 "#cb8a33", # Col.203: Hue=023 Sat=143 Lum=120 "#d68c28", # Col.204: Hue=023 Sat=164 Lum=120 "#e38e1b", # Col.205: Hue=023 Sat=188 Lum=120 "#f0900e", # Col.206: Hue=023 Sat=213 Lum=120 "#ff9200", # Col.207: Hue=023 Sat=240 Lum=120 "#8f786f", # Col.208: Hue=011 Sat=030 Lum=120 "#8f786f", # Col.209: Hue=011 Sat=031 Lum=120 "#91776d", # Col.210: Hue=011 Sat=034 Lum=120 "#93766b", # Col.211: Hue=011 Sat=038 Lum=120 "#977467", # Col.212: Hue=011 Sat=045 Lum=120 "#9b7263", # Col.213: Hue=011 Sat=053 Lum=120 "#a1705d", # Col.214: Hue=011 Sat=064 Lum=120 "#a76d57", # Col.215: Hue=011 Sat=076 Lum=120 "#af694f", # Col.216: Hue=011 Sat=090 Lum=120 "#b76647", # Col.217: Hue=011 Sat=106 Lum=120 "#c0623e", # Col.218: Hue=011 Sat=123 Lum=120 "#cb5d33", # Col.219: Hue=011 Sat=143 Lum=120 "#d65828", # Col.220: Hue=011 Sat=164 Lum=120 "#e3521b", # Col.221: Hue=011 Sat=188 Lum=120 "#f04c0e", # Col.222: Hue=011 Sat=213 Lum=120 "#ff4600", # Col.223: Hue=011 Sat=240 Lum=120 "#8f6f6f", # Col.224: Hue=000 Sat=030 Lum=120 "#8f6f6f", # Col.225: Hue=000 Sat=031 Lum=120 "#916d6d", # Col.226: Hue=000 Sat=034 Lum=120 "#936b6b", # Col.227: Hue=000 Sat=038 Lum=120 "#976767", # Col.228: Hue=000 Sat=045 Lum=120 "#9b6363", # Col.229: Hue=000 Sat=053 Lum=120 "#a15d5d", # Col.230: Hue=000 Sat=064 Lum=120 "#a75757", # Col.231: Hue=000 Sat=076 Lum=120 "#af4f4f", # Col.232: Hue=000 Sat=090 Lum=120 "#b74747", # Col.233: Hue=000 Sat=106 Lum=120 "#c03e3e", # Col.234: Hue=000 Sat=123 Lum=120 "#cb3333", # Col.235: Hue=000 Sat=143 Lum=120 "#d62828", # Col.236: Hue=000 Sat=164 Lum=120 "#e31b1b", # Col.237: Hue=000 Sat=188 Lum=120 "#f00e0e", # Col.238: Hue=000 Sat=213 Lum=120 "#ff0000", # Col.239: Hue=000 Sat=240 Lum=120 "#000000", # Col.240: R=G=B=000 "#111111", # Col.241: R=G=B=017 "#222222", # Col.242: R=G=B=034 "#333333", # Col.243: R=G=B=051 "#444444", # Col.244: R=G=B=068 "#555555", # Col.245: R=G=B=085 "#666666", # Col.246: R=G=B=102 "#777777", # Col.247: R=G=B=119 "#888888", # Col.248: R=G=B=136 "#999999", # Col.249: R=G=B=153 "#aaaaaa", # Col.250: R=G=B=170 "#bbbbbb", # Col.251: R=G=B=187 "#cccccc", # Col.252: R=G=B=204 "#dddddd", # Col.253: R=G=B=221 "#eeeeee", # Col.254: R=G=B=238 "#ffffff", # Col.255: R=G=B=255 ) -------------- next part -------------- C00 C01 C02 C03 C04 C05 C06 C07 C08 C09 C10 C11 C12 C13 C14 C15 R00 000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 R01 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 R02 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 R03 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 R04 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 R05 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 R06 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 R07 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 R08 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 R09 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 R10 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 R11 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 R12 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 R13 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 R14 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 R15 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 -------------- next part -------------- A non-text attachment was scrubbed... Name: Rplot.png Type: image/png Size: 8201 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/20000629/44c095e9/Rplot.png
Prof Brian D Ripley
2000-Jun-29 08:27 UTC
[R] Colour depth reduced to 12 by bitmap devices
On Thu, 29 Jun 2000, Clive Jenkins wrote:> I am using R to create colour plots as bitmap files. I have created a > palette of 256 colours that I want to use, but the resultant output > files contain only 12 colours used in dither patterns. The result is the > same whether I use bmp() or png().What about bitmap()? Have you tried that? Internally bmp/png/jpeg use take a copy of the screen, so what you get depends on your graphics card driver. If you are seeing dithering in the PNG file, do you see it on screen? Is your screen set to a truecolour mode? bitmap() works via ghostscript.> How can I get the true colours that I specified instead of dither > patterns? (making the driver's job easier!) > > I am using R 1.1.0 for Windows (rw1010). The attached files are:- > > src256.R Test program to be run by source("src256.R") > col_256.R Colour palette read by src256.R > col_256.dat Test data representing a 16x16 square image using > all 256 colours > Rplot.png The resulting bitmap. > > If anyone can improve on my code in src256.R, then please do so! > > A further problem is that I cannot reduce the point size of the tick > labels (character strings in this case) using any of:- > > par(cex=0.2) > par(cex.axis=0.2) > axis(..., cex=0.2, ...) > axis(..., cex.axis=0.2, ...) > > One final observation: in accordance with polymorphism of R, I would > prefer the function image() to take a data frame parameter directly, > e.g. image(a.df), so there would be no need to extract the row and > column names and pass them separately. Unfortunately this cannot be done > while retaining backward compatibility because the essential data item > is the third parameter not the first. As a messy compromise, perhaps > image() could be extended to accept image(,,a.df) where `a.df' is a data > frame.I just don't see how this can work. image requires x, y and z, and x and y are intended to be one longer than the rows and columns of the matrix z. That the equal-length case works is a historical anomaly, and only makes sense (to me) for reqularly spaced grids. You are quite at liberty to write a `myimage' function to your own specification. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian D Ripley
2000-Jun-29 09:19 UTC
[R] Colour depth reduced to 12 by bitmap devices
On Thu, 29 Jun 2000, Prof Brian D Ripley wrote:> On Thu, 29 Jun 2000, Clive Jenkins wrote: > > > I am using R to create colour plots as bitmap files. I have created a > > palette of 256 colours that I want to use, but the resultant output > > files contain only 12 colours used in dither patterns. The result is the > > same whether I use bmp() or png(). > > What about bitmap()? Have you tried that? > > Internally bmp/png/jpeg use take a copy of the screen, so what you get > depends on your graphics card driver. If you are seeing dithering in the > PNG file, do you see it on screen? Is your screen set to a truecolour > mode? > > bitmap() works via ghostscript.I can confirm that none of png, bmp, bitmap dither on my system for this example. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- Cisco Asterisk Integration
- Step-by-Step Tutorial: How to Deploy cPanel Web Hosting Control Panel version 11.74 on CentOS 7.5 Linux Server version 1805 in Amazon AWS Cloud
- Converting integers to chars i.e 1 to "01"
- writing to file with encodings (PR#2674)
- adding zero to a number vector