Open tpoisot opened 9 years ago
I think I might be having the same issue. In my case I'm trying to plot firms entering and leaving a sample over the overall sample period. The values used for colours are only [0, 1, 2, 3] and assigned manually using Scale.color_discrete_manual()
.You can see a blue rectangle in the top left of my plot. It does not seem to be present in my data. If I exclude half the firms from the sample I get a similar artefact, but stretched over many more periods.
Here's my code:
## Create a data frame for plotting
data = DataFrame(Firm = firms_alive[:, 1], Period = firms_alive[:, 2],
Exittype = firms_alive[:, 3])
## Create heatmap plot
pl = plot(data, x="Period", y = "Firm", color="Exittype", Geom.rectbin, theme_presentation(),
Scale.color_discrete_manual("white", "green", "red", "blue"; levels = [0, 1, 2, 3]),
Guide.yticks(ticks=[0:300:2100]), Guide.xticks(ticks=[0:25:250]))
I have a bunch of data on two log10 axes. All points are evenly spaced, but
rectbin
is doing a weird thing: the last bin is stretched a lot (that happens in either directions).Here is the code I use: