Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

legend is weird with numeric + non-numeric point types #399

Open
lindsayplatt opened this issue Jul 29, 2016 · 9 comments
Open

legend is weird with numeric + non-numeric point types #399

lindsayplatt opened this issue Jul 29, 2016 · 9 comments
Assignees

Comments

@lindsayplatt
Copy link

When you mix point types and try to add a legend, the legend looks funny.

gs <- gsplot() %>% 
    points(1,1, pch=2, legend.name="stuff") %>% 
    points(1,2, pch=25, legend.name="more stuff") %>%
    legend()
gs

image

gs <- gsplot() %>% 
    points(1,1, pch="o", legend.name="stuff") %>% 
    points(1,2, pch=25, legend.name="more stuff") %>%
    legend()
gs

image

@lindsayplatt lindsayplatt self-assigned this Jul 29, 2016
@jordansread
Copy link
Member

Same code different pkg version? Or did I miss the difference in the code?

@lindsayplatt
Copy link
Author

First one has both numeric pch, the second has one with "o" which is a valid pch. Just makes legend freak out

@lindsayplatt
Copy link
Author

Hmm this is actually also a problem with base: http://stackoverflow.com/questions/13453104/r-legend-pch-mix-of-character-and-numeric

@lindsayplatt
Copy link
Author

@mhines-usgs pointed out that they are using ascii codes so each of the character options does have a numeric equivalent. The question is, should we expect users to figure this out, or should gsplot handle this in the background and convert characters to their ascii code?

http://www.columbia.edu/kermit/ascii.html

@lindsayplatt lindsayplatt removed the bug label Jul 29, 2016
@jordansread
Copy link
Member

wontfix for now?

@lindsayplatt
Copy link
Author

@jiwalker-usgs thinks we should handle this and do an ASCII lookup or something where we are adding pch to legend (which would be in get_legend_args)

@lindsayplatt
Copy link
Author

@jread-usgs going to say "for later" or "enhancement" instead

@jordansread
Copy link
Member

Either way sounds fine to me 👍

@mhines-usgs
Copy link
Contributor

★░░░░░░░░░░░████░░░░░░░░░░░░░░░░░░░░★ ★░░░░░░░░░███░██░░░░░░░░░░░░░░░░░░░░★ ★░░░░░░░░░██░░░█░░░░░░░░░░░░░░░░░░░░★ ★░░░░░░░░░██░░░██░░░░░░░░░░░░░░░░░░░★ ★░░░░░░░░░░██░░░███░░░░░░░░░░░░░░░░░★ ★░░░░░░░░░░░██░░░░██░░░░░░░░░░░░░░░░★ ★░░░░░░░░░░░██░░░░░███░░░░░░░░░░░░░░★ ★░░░░░░░░░░░░██░░░░░░██░░░░░░░░░░░░░★ ★░░░░░░░███████░░░░░░░██░░░░░░░░░░░░★ ★░░░░█████░░░░░░░░░░░░░░███░██░░░░░░★ ★░░░██░░░░░████░░░░░░░░░░██████░░░░░★ ★░░░██░░████░░███░░░░░░░░░░░░░██░░░░★ ★░░░██░░░░░░░░███░░░░░░░░░░░░░██░░░░★ ★░░░░██████████░███░░░░░░░░░░░██░░░░★ ★░░░░██░░░░░░░░████░░░░░░░░░░░██░░░░★ ★░░░░███████████░░██░░░░░░░░░░██░░░░★ ★░░░░░░██░░░░░░░████░░░░░██████░░░░░★ ★░░░░░░██████████░██░░░░███░██░░░░░░★ ★░░░░░░░░░██░░░░░████░███░░░░░░░░░░░★ ★░░░░░░░░░█████████████░░░░░░░░░░░░░★ ★░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░★

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants