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:

## How to make previous inputs progressively fade out in a Matlab plot when I add new inputs

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):

## Using “curve” to plot a function: a tricky expression?

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?

## How to center boxes on top of lines in the legend of a plot?

I would like to superimpose transparent boxes on top of the lines in the legend. A small example:which produces:

## Finagling the space and width arguments to barplot to align 2×1 plot window

I'd like to align the bottom barplot in the following so that the groups line up vertically between the two plots:

## How to find an intersection of curve and circle?

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.