JetBrains / JetBrains/lets-plot

geom_point cannot be plot when the input for the parameter 'shape' is a string

Open
#317 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.8k
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Preconditions
Plot the following:
```
extra_points = pd.DataFrame({'a': [0, 0], 'b': [1, 4]})
plot = ggplot() + geom_point(data=extra_points, mapping=aes(x='a', y='b'), shape='X')
```
The following would be shown:
![image](https://user-images.githubusercontent.com/4430922/107988919-08059980-6f9f-11eb-9f69-bb310c335558.png)

In R, you would have the following

```
library(ggplot2)

extra_points <- data.frame(x = c(3.0, 4.0, 5.0), y= c(3.0, 4.0, 5.0))

# create factors with value labels
mtcars$gear <- factor(mtcars$gear)
mtcars$am <- factor(mtcars$am)
mtcars$cyl <- factor(mtcars$cyl)

ggplot() +
geom_point(data = mtcars, aes(x = wt, y = drat, color = gear, shape = am)) + geom_point(data = extra_points, aes(x, y), shape = 'X', size = 10)
```

![image](https://user-images.githubusercontent.com/4430922/107988982-33888400-6f9f-11eb-8daf-08c3ad7fc447.png)

You can find more about this here:

http://sape.inf.usi.ch/quick-reference/ggplot2/shape

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.