jbkunst / rchess

♛ Chess package for R
http://jkunst.com/rchess
Other
74 stars 8 forks source link

remove background and add letters to ggchessboard #15

Closed oganm closed 5 years ago

jbkunst commented 5 years ago

Hi @oganm

Can you send me a image with the change please? 😅

oganm commented 5 years ago

Yup. The only difference is the removal of the grey background leftover from theme_gray and replaces the letters for the x axis

pgn = system.file("extdata/pgn/kasparov_vs_topalov.pgn", package = "rchess")
pgn = readLines(pgn, warn = FALSE)
pgn <- paste(pgn, collapse = "\n")
board = rchess::Chess$new()
board$load_pgn(pgn)
ggchessboard(board$fen())

image

jbkunst commented 5 years ago

Perfect! Do you think it is a good idea remove the ticks to have a cleaner chart?

image

(from http://www.sthda.com/english/wiki/ggplot2-axis-ticks-a-guide-to-customize-tick-marks-and-labels)

Please do not forget to add yourself to the list of contributors :). See https://github.com/jbkunst/rchess/blob/master/DESCRIPTION#L10

oganm commented 5 years ago

yep. was wondering if I would have to bring the text closer when the ticks are gone but I guess it looks fine?

image

jbkunst commented 5 years ago

Maybe enlarge the letters a little bit solves that problem too.

Anyway if you consider this is fine I will merge ;). Thanks again :D.

oganm commented 5 years ago

Added it as the labelsize argument and enlarged it a little. Not sure about that name

image

oganm commented 5 years ago

I didn't do a devtools::document because your line endings seem to change creating a mess.

jbkunst commented 5 years ago

LGTM, if you are agree I'll merge and document the package later.

oganm commented 5 years ago

yay!

jbkunst commented 5 years ago

Thanks 😄