Comments (5)
Hi @bartekbursa. At the moment, there isn't an argument in show_plot()
that does this, but I think it would be straightforward to add. It may also be possible to change this after the show_plot()
call by manipulating the ggplot2
object. Is there a particular plot you have in mind?
from inspectdf.
Thanks for your response. It would be very convenient to be able to change some graphical parameters of the plots after show_plot()
. In particular, I would like to change the color of the labels on plots made from inspect_cat
from white to black. And possibly also the font size.
from inspectdf.
Thanks @bartekbursa. I agree, this would be a great feature to add. I've added it to the backlog and will leave this issue open until it's implemented.
In the meantime, an inelegant solution is to modify the ggplot2
object, for example:
library(dplyr)
library(inspectdf)
library(ggplot2)
# save the ggplot object
gf <- starwars %>% inspect_cat %>% show_plot
# decrease the label size
gf$layers[[2]]$aes_params$size <- 5
# change the text color - ignore the warning
gf <- gf + scale_colour_manual(values = c("red", "black"))
# view the modified plot
gf
Hope that helps!
from inspectdf.
Thanks @alastairrushworth for the workaround! It works fine :)
from inspectdf.
Hi @bartekbursa thanks for raising this issue. It is now possible to change the color of text label in several of the show_plot()
outputs by adding the label_color = ...
argument. I will add this change to the next cran release in a week or so. For example
library(dplyr)
library(inspectdf)
library(ggplot2)
starwars %>% inspect_cat %>% show_plot(label_color = c('red'))
For inspect_cat()
, I haven't added flexibility to adjust the font size - resizing of text is handled internally at the moment. I might add the option to fix this size for a future release, but leaving as is for now, unless there is a good use case / example.
Thanks again for the suggestions :)
from inspectdf.
Related Issues (20)
- Bug: `inspect_imb()` fails on factor columns HOT 1
- Rearranging output of `inspect_cat()` removes labels for `show_plot()` HOT 3
- label_size, label_angle & label_color to work for comparison plots
- show_ggplotly
- change white color for last (or second) factor. HOT 2
- travis --> GitHub actions
- improve jsd statistic for comparison
- type comparison to include names and types, new plots
- Improvements to inspect_cat
- inspect_cat and comparison plots HOT 1
- show_plot() bars not aligned w/ values below. HOT 6
- inspect_num: inconsistent binning of numerical variables in comparisons HOT 1
- inspect_num %>% show_plot fails on grouped dataframe with Error object 'mid' not found HOT 1
- inspect_num show_plot error HOT 1
- Partial argument match of 'unit' to 'units'
- Change to new cran checks badge URL HOT 1
- [New Functionality] "inspect_num()" add parameter to define number of columns.
- Bug: `inspect_num()` not able to deal with different ranges in `df2`
- Change in expected plot from v0.0.9 and v0.0.12
- Wish for ordered categories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inspectdf.