The scale_fill_hue()
function can take a h.start=
parameter to choose where you pick the first color (as described on the ?scale_fill_hue
help page)
ggplot(xdf, aes(x = X1, y = freq)) + geom_col(aes(fill = factor(X8)), position = 'dodge')+ scale_fill_hue(h.start = 120)
Related Posts:
- Position-dodge warning with ggplot boxplot?
- ggplot geom_text font size control
- What does Continuous x aesthetic — did you forget aes(group=…) mean?
- increase legend font size ggplot2
- Emulate ggplot2 default color palette
- ggplot wrong color assignment
- ggplot2 line chart gives “geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?”
- Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : Polygon edge not found
- Editing legend (text) labels in ggplot
- Plot multiple lines in one graph
- Create empty data frame with column names by assigning a string vector?
- Changing font size and direction of axes text in ggplot2
- Count number of occurences for each unique value
- Warning message: line appears to contain embedded nulls [duplicate]
- How to change line width in ggplot?
- Error in library(ggplot2) : There is no package called ‘ggplot2’
- Transpose a data frame
- How to drop columns by name in a data frame
- How to reshape data from long to wide format
- Change size of axes title and labels in ggplot2
- What’s the difference between lapply and do.call?
- Combine two or more columns in a dataframe into a new column with a new name
- Increase number of axis ticks
- R “Error: unexpected ‘}’ in “}”
- How to remove outliers from a dataset
- Mean per group in a data.frame
- Error in dev.off() : cannot shut down device 1 (the null device)
- How to create an empty matrix in R?
- standard deviation on dataframe does not work
- How to increase font size in a plot in R?
- What is the difference between = and ==?
- Merge r brings error “‘by’ must specify uniquely valid columns”
- Subscripts in plots in R
- What does the error “arguments imply differing number of rows: x, y” mean?
- Aggregate multiple columns at once
- Error in model.frame.default: variable lengths differ
- Non-numeric argument to mathematical function
- data.table vs dplyr: can one do something well the other can’t or does poorly?
- R – Concatenate two dataframes?
- lme4::lmer reports “fixed-effect model matrix is rank deficient”, do I need a fix and how to?
- R multiple conditions in if statement
- Convert data.frame columns from factors to characters
- Re-ordering factor levels in data frame
- ggplot2, facet_grid, free scales?
- Understanding the result of modulo operator: %%
- Simple manual RMarkdown tables that look good in HTML, PDF and DOCX
- Select rows from a data frame based on values in a vector
- how to increase the limit for max.print in R
- dplyr: “Error in n(): function should not be called directly”
- backward elimination in R
- Filter data.frame rows by a logical condition
- How to plot 3D scatter diagram using ggplot?
- How do I convert a factor into date format?
- Write lines of text to a file in R
- How to compute summation in r
- Plot multiple boxplot in one graph
- R will plot but won’t draw abline
- scale_fill_discrete and scale_fill_manual – legend options confusion
- R – argument is of length zero in if statement
- ‘Incomplete final line’ warning when trying to read a .csv file into R
- Merging data – Error in fix.by(by.x, x)
- Error in 2:n : NA/NaN argument
- Error in generating boxplot two variable data frame: adding class “factor” to an invalid object
- Error : Unable to start png() device
- Remove NA values from a vector
- How to catch integer(0)?
- Print string and variable contents on the same line in R
- “no function to return from, jumping to top level”
- r random forest error – type of predictors in new data do not match
- env=baseenv() in R
- How to set axis range R
- How to melt and cast dataframes using dplyr?
- What does the error “object not interpretable as a factor” mean?
- use first row data as column names in r
- Gradient of n colors ranging from color 1 and color 2
- What is the difference between require() and library()?
- Launching R help: Error in file(out, “wt”) : cannot open the connection
- R Sweave: NO TeX installation detected
- Plotting legend outside plot in R
- Boolean operators && and ||
- R avoiding “restarting interrupted promise evaluation” warning
- do-while loop in R
- ERROR: [on_request_read] connection reset by peer in R shiny
- Error in as.vector(x, mode) : cannot coerce type ‘closure’ to vector of type ‘any’
- Suppress output of a function
- Get dplyr count of distinct in a readable way
- What does is.na() applied to non-(list or vector) of type ‘NULL’ mean?
- error r: invalid subscript type “closure” in a simple regression
- r function unzip error 1 in extracting from zip file
- Colour points in a plot differently depending on a vector of values
- How To Create Vector of Vector In R
- Round down a numeric
- Use of ~ (tilde) in R programming Language
- Error: x must be atomic for ‘sort.list’
- Transposing in dplyr
- Does the c command create a row vector or a column vector by default in R
- Can dplyr join on multiple columns or composite key?
- Convert data.frame column to a vector?
- Error in summary.connection(connection) : invalid connection
- Converting from a character to a numeric data frame