The problem is the tiny variation in the sample value, which makes the density plot look ugly/overlapping (numeric) labels along the abscissa of the density plot. Similarly, when I use StatsPlot directly on the result, e.g.,

In this case, corrplot automates plotting a matrix of figures, so perhaps it is more difficult here… (all element plots will have different axes values…)

Actually, using the code above but saving the corrplot to a format that allows arbitrary zoom (ex: svg, pdf), the result looks OKish. Needs further plumbing.
Better filling an issue, if there isn’t one on this yet.

I’m getting quite happy with the results of your suggestions so far. One thing, though…

Is it possible to do the same trick with labels on the ordinate axis as you proposed on the abscissa?

To do so, I need to know the variation in the “density” of the iterations in Turing… I have used the density plot function of StatsPlot, and that function hides how it computes the density. I assume it uses some sort of histogram function, but the peak of the density depends on a lot of things (number of bins, or whatever).

Question: Is there a way to extract the chosen ylims value from a plot?

Is it possible to extract individual plots from this layout, and operate on the individual plot?

Is it possible to scale the data series, e.g., the ordinate values y when I do plot (x,y).

[I’m trying to plot the prior distribution and the posterior distribution in the same plot, and need to scale the ordinate values so that they have similar peak value… – it is the shift in location and width in the abscissa direction that is of interest in this comparison.]

Suppose I have two density plots with wildly different maximal ylims values, and I want to show them in the same plot (i.e., comparing apriori and aposteriori distributions). For such a comparison, I don’t really care about the scaling in the ordinate direction – I mainly care about how one distribution is shifted and made wider/narrower compared to the other in the abscissa direction…

Using density plot, the plotting algorithm produces the series to plot (x values, y values) based on “random” outcomes (e.g., from Turing) – but the user doesn’t see the y values.

I don’t know how density works. I assume some histogram function is used (but what bin size?), and then a smooth function is fitted to the histogram … I would guess.

In summary, if I want to put two density plots in the same plot, I would like to scale the y value of each plot so that their peak values are comparable.

Of course – if I want to compare a posterior plot with a priori plot, I can get around this…

I can plot the posterior plot using density, then use your trick of reading ylims.

Then, since the priori distribution is known, I can use the Distributions package to produce the density – where I do have some control of the scaling.

Since I actually want to compare a priori distribution and a posteriori distribution, I guess I can get around the problem…

Actually, if the two density plots have wildly different y-scales, then the same probably happens with the x-scales. Meaning that for a nice comparison, double x- and double y-scales might be required. Plots.jl may not cope well with that use case and you may need PyPlot, for example.

NB: if you do not care about the tick labels on the x-axis, then a linear transformation of one of the variables will do.