Can you add texture to a box plot in ggplot2? [duplicate] - r

This question already has an answer here:
Pattern fills for graphs
(1 answer)
Closed 9 years ago.
Is there a command to add a pattern or texture to the fill of boxplots? I have my variables colour coded, but I want them to also be distinguishable in greyscale...
Many thanks!

As Hadley commented in a previous string. It is currently not possible.
https://stackoverflow.com/a/2901210/2762612

Related

ggplot2 geom_col() does not show all items [duplicate]

This question already has answers here:
order of stacked bars in ggplot
(1 answer)
Force ggplot legend to show all categories when no values are present [duplicate]
(1 answer)
Can you put labels between horizontal bars?
(2 answers)
Closed last month.
I'm new to R and I'm trying to plot a small survey where I used a likert-scale.
I'm using
ggplot(Likert, aes(x=Anzahl, y=Frage, fill=Zustimmung)) + geom_col()
to display the data. There are probably better ways to do this and I probably should use data frames as I currently don't use them.
Now the actual Problem: The variable "Zustimung" has 5 different specifications but only 4 of them are shown and there are sorted weirdly.
I've found a few different posts online which seem to be regarding this issue but I can't understand them. Could someone please explain why this problem occures and how I can fix this?

Set limits in ggplot without loosing data points [duplicate]

This question already has an answer here:
Limit ggplot2 axes without removing data (outside limits): zoom
(1 answer)
Closed 1 year ago.
I want to focus on certain numbers above 0 in the y axis, so I tried to use
ylim(ymin=0,ymax=15)
but by doing this I removed values that are not in the figure
I tried to find another argument that will only "zoom" the figure but do not remove any actual value and the line will remain
Does anyone know any argument that will be valid?
E.g. figures
Try to use this instead of ylim()
coord_cartesian(ylim=c(0, 15))

color in ggplot2 legend not matching figure [duplicate]

This question already has answers here:
Why are the colors wrong on this ggplot? [duplicate]
(2 answers)
GGPLOT Color won't work [closed]
(1 answer)
Closed 4 years ago.
I have a problem getting the legend in ggplot2 to correspond to the color in the figure. And I have extra variables in the legend. I have read many posts on similar issues but unfortunately I have not been able to apply those to this situation - successfully at least. I tried using "fill" and "scale_fill_manual()", "theme()" and several others, but to no avail yet. Hopefully I am just missing something simple here, I appreciate any suggestions!
I am making a map and my code right now is:
ggplot()+ geom_map(data=world, map=world,aes(x=long, y=lat, map_id=region),color="white", fill="#7f7f7f", size=0.05)+
geom_point(aes(x=long.a,y=lat.a, size=var.p, color="red", alpha=0.5))
The plot looks like this:

Change month order using R and ggplot2 [duplicate]

This question already has answers here:
How do you specifically order ggplot2 x axis instead of alphabetical order? [duplicate]
(2 answers)
Closed 4 months ago.
So I'm having a pretty big problem. I'm trying to plot animal density (using two methods) against months.
When I plot one of the two methods, the months go out of order and I can't seem to get them to work.
In the end I want to have each of the two methods (camera.estimations and scat.estimations) on the same plot, with SD of each included and months in the right order. Any pointers from you lovely R folk would be awesome!
Here's my data:
https://docs.google.com/spreadsheet/ccc?key=0AjSTnjcF57_IdEhUXzFyQmtZaG5NXzdzTXZkbFdweXc&usp=sharing
I have used this post to help structure my ggplots before
How do you specifically order ggplot2 x axis instead of alphabetical order?
Manually setting the order of factors works but can be annoying, but is the best answer I have for you :)
without more information hope it helps!

R - change colors in ggplot2 plot [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
ggplot custom colors palette
Hello,
I am using this question - Making a stacked area plot using ggplot2 - to make a nice stacked area plot.
The resulting grapg is nice, but I cannot find how to change the colors in ggplot graph.
you need to manual designate the colors you want to use, then use scale_fill_manual.
rhg_cols1<- c("#000000","#F8766D","#7CAE00","#00BFC4","#C77CFF" )
ggplot()+geom_bar()+opts()+ scale_fill_manual(values = rhg_cols1)

Resources