I would like to draw a ggplot with a random theme (In fact, I want to draw many plots, each with a different themes). Consider the following reproducible example:
Let's say I have this very simple loopThe coordinates that I am plotting correspond to the joints of a multibody system, and I am simulating their positions over time (please see a sample of the plot here):
My question concerns something that should be fairly simple, but I can't make it work. What I mean is you can calculate x and y and then plot them with the plot function. But can this be done using the curve function?
I would like to superimpose transparent boxes on top of the lines in the legend. A small example:which produces:
I'd like to align the bottom barplot in the following so that the groups line up vertically between the two plots:
I have a curve, derived from empirical data, and I can obtain a reasonable model of it. I need to identify a point (x, y) where the curve intersects a circle of known center and radius. The following code illustrates the question.