On 07/20/2018 01:28 PM, Bert Gunter wrote:> Nothing attached. The mail server strips most attachments for security.
Here is my repex, inline:
library(ggplot2)
conv_df <- structure(list(Adjustment = structure(c(1L, 2L, 3L, 4L, 5L, 1L,
??????????????????????????????????????? 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L,
5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L,
??????????????????????????????????????? 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L,
1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L,
??????????????????????????????????????? 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L,
2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L,
??????????????????????????????????????? 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L,
3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L,
??????????????????????????????????????? 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L,
4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L,
??????????????????????????????????????? 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L,
5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L,
??????????????????????????????????????? 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L,
1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L,
??????????????????????????????????????? 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L,
2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L,
??????????????????????????????????????? 5L), .Label = c("Radar",
"MeanFieldBias", "Multiplicative", "Mixed",
"ConditionalMerge"), class = "factor"), Struct =
c("Bias only",
"Bias only", "Bias only", "Bias only", "Bias
only", "Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "FFT-based struct.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"Bias only", "Bias only", "Bias only", "Bias
only", "Bias only",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "Bias only", "Bias only",
"Bias only", "Bias only",
"Bias only", "Lognormal error dist.", "Lognormal error
dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "FFT-based struct.", "Bias
only", "Bias only",
"Bias only", "Bias only", "Bias only",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "FFT-based struct.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"Bias only", "Bias only", "Bias only", "Bias
only", "Bias only",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "Bias only", "Bias only",
"Bias only", "Bias only",
"Bias only", "Lognormal error dist.", "Lognormal error
dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "FFT-based struct.", "Bias
only", "Bias only",
"Bias only", "Bias only", "Bias only",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "FFT-based struct.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"Bias only", "Bias only", "Bias only", "Bias
only", "Bias only",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "Bias only", "Bias only",
"Bias only", "Bias only",
"Bias only", "Lognormal error dist.", "Lognormal error
dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "FFT-based struct."), Error =
c("Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "Low CML error", "Low CML
error", "Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error")), .Names =
c("Adjustment",
"Struct", "Error"), row.names = c(1L, 3L, 4L, 5L, 6L, 11L,
13L,
14L, 15L, 16L, 21L, 23L, 24L, 25L, 26L, 31L, 33L, 34L, 35L, 36L,
41L, 43L, 44L, 45L, 46L, 51L, 53L, 54L, 55L, 56L, 61L, 63L, 64L,
65L, 66L, 71L, 73L, 74L, 75L, 76L, 81L, 83L, 84L, 85L, 86L, 91L,
93L, 94L, 95L, 96L, 101L, 103L, 104L, 105L, 106L, 111L, 113L,
114L, 115L, 116L, 121L, 123L, 124L, 125L, 126L, 131L, 133L, 134L,
135L, 136L, 141L, 143L, 144L, 145L, 146L, 151L, 153L, 154L, 155L,
156L, 161L, 163L, 164L, 165L, 166L, 171L, 173L, 174L, 175L, 176L,
181L, 183L, 184L, 185L, 186L, 191L, 193L, 194L, 195L, 196L, 201L,
203L, 204L, 205L, 206L, 211L, 213L, 214L, 215L, 216L, 221L, 223L,
224L, 225L, 226L, 231L, 233L, 234L, 235L, 236L, 241L, 243L, 244L,
245L, 246L, 251L, 253L, 254L, 255L, 256L, 261L, 263L, 264L, 265L,
266L), class = "data.frame")
strat_df <- structure(list(Adjustment = structure(c(1L, 2L, 3L, 4L, 5L, 1L,
??????????????????????????????????????????????????? 2L, 3L, 4L, 5L, 1L,
2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L,
??????????????????????????????????????????????????? 3L, 4L, 5L, 1L, 2L,
3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L,
??????????????????????????????????????????????????? 4L, 5L, 1L, 2L, 3L,
4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L,
??????????????????????????????????????????????????? 5L, 1L, 2L, 3L, 4L,
5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L,
??????????????????????????????????????????????????? 1L, 2L, 3L, 4L, 5L,
1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L,
??????????????????????????????????????????????????? 2L, 3L, 4L, 5L, 1L,
2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L,
??????????????????????????????????????????????????? 3L, 4L, 5L, 1L, 2L,
3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L,
??????????????????????????????????????????????????? 4L, 5L, 1L, 2L, 3L,
4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L,
??????????????????????????????????????????????????? 5L), .Label =
c("Radar", "MeanFieldBias", "Multiplicative",
"Mixed",
"ConditionalMerge"), class = "factor"), Struct =
c("Bias only",
"Bias only", "Bias only", "Bias only", "Bias
only", "Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "FFT-based struct.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"Bias only", "Bias only", "Bias only", "Bias
only", "Bias only",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "Bias only", "Bias only",
"Bias only", "Bias only",
"Bias only", "Lognormal error dist.", "Lognormal error
dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "FFT-based struct.", "Bias
only", "Bias only",
"Bias only", "Bias only", "Bias only",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "FFT-based struct.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"Bias only", "Bias only", "Bias only", "Bias
only", "Bias only",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "Bias only", "Bias only",
"Bias only", "Bias only",
"Bias only", "Lognormal error dist.", "Lognormal error
dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "FFT-based struct.", "Bias
only", "Bias only",
"Bias only", "Bias only", "Bias only",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "FFT-based struct.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"Bias only", "Bias only", "Bias only", "Bias
only", "Bias only",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"Lognormal error dist.", "Lognormal error dist.",
"FFT-based struct.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "Bias only", "Bias only",
"Bias only", "Bias only",
"Bias only", "Lognormal error dist.", "Lognormal error
dist.",
"Lognormal error dist.", "Lognormal error dist.",
"Lognormal error dist.",
"FFT-based struct.", "FFT-based struct.", "FFT-based
struct.",
"FFT-based struct.", "FFT-based struct."), Error =
c("Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "Low CML error", "Low CML
error", "Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Low CML error", "Low CML error", "Low CML error",
"Low CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"Med CML error",
"Med CML error", "Med CML error", "Med CML error",
"High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error", "High CML
error", "High CML error",
"High CML error", "High CML error")), .Names =
c("Adjustment",
"Struct", "Error"), row.names = c(2L, 7L, 8L, 9L, 10L, 12L,
17L,
18L, 19L, 20L, 22L, 27L, 28L, 29L, 30L, 32L, 37L, 38L, 39L, 40L,
42L, 47L, 48L, 49L, 50L, 52L, 57L, 58L, 59L, 60L, 62L, 67L, 68L,
69L, 70L, 72L, 77L, 78L, 79L, 80L, 82L, 87L, 88L, 89L, 90L, 92L,
97L, 98L, 99L, 100L, 102L, 107L, 108L, 109L, 110L, 112L, 117L,
118L, 119L, 120L, 122L, 127L, 128L, 129L, 130L, 132L, 137L, 138L,
139L, 140L, 142L, 147L, 148L, 149L, 150L, 152L, 157L, 158L, 159L,
160L, 162L, 167L, 168L, 169L, 170L, 172L, 177L, 178L, 179L, 180L,
182L, 187L, 188L, 189L, 190L, 192L, 197L, 198L, 199L, 200L, 202L,
207L, 208L, 209L, 210L, 212L, 217L, 218L, 219L, 220L, 222L, 227L,
228L, 229L, 230L, 232L, 237L, 238L, 239L, 240L, 242L, 247L, 248L,
249L, 250L, 252L, 257L, 258L, 259L, 260L, 262L, 267L, 268L, 269L,
270L), class = "data.frame")
ggplot(strat_df, mapping=aes(x=Intercept, y=Slope)) +
? geom_point(aes(color=Struct, shape=Adjustment), size=6)
ggplot(strat_df, mapping=aes(x=Intercept, y=Slope)) +
? geom_point(aes(color=Error, shape=Adjustment), size=6)
ggplot(conv_df, mapping=aes(x=Intercept, y=Slope)) +
? geom_point(aes(color=Struct, shape=Adjustment), size=6)
ggplot(conv_df, mapping=aes(x=Intercept, y=Slope)) +
? geom_point(aes(color=Error, shape=Adjustment), size=6)
>
> See the posting guide below and ?dput for how to include data.
> + We need your faulty code also, of course.
>
> Cheers,
> Bert
>
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
)
>
> On Fri, Jul 20, 2018 at 3:15 AM, Micha Silver <tsvibar at gmail.com
> <mailto:tsvibar at gmail.com>> wrote:
>
> Hello:
>
> I have two data frames (subsetted from a larger one). I am
> plotting scatterplots with ggplot2 and coloring by different
> variables. When using one of the variables "Error" with one
of the
> dataframes "conv_df" only a single color is displayed. All
the
> other variables show colors as expected, and when applying the
> same ggplot() functions to the second dataframe, colors are
> correctly applied for all variables.
>
> I'm scratching me head over this for some time. Maybe someone can
> see what I'm missing?
>
> My repex is attached
>
> Thanks
>
> --
> Micha Silver
> Ben Gurion Univ.
> Sde Boker, Remote Sensing Lab
> cell: +972-523-665918
>
> ______________________________________________
> R-help at r-project.org <mailto:R-help at r-project.org> mailing
list --
> To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> <https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918