pythonmatplotlibplotridgeline-plot

Negative values in joy plot from non-negative data set


I am creating a joyplot using joypy.

All my data is between[0,1].

But I get a big range of negative values in the graph:

enter image description here

enter image description here

import joypy
import pandas as pd
from matplotlib import pyplot as plt
from matplotlib import cm
import matplotlib.ticker as ticker
import matplotlib
matplotlib.use('TkAgg')


iris = pd.read_csv("1_5.csv")

fig, axes = joypy.joyplot(iris)


x = [0,0.25,0.5,0.75,1]

plt.xticks(x)

plt.show()

Solution

  • It isn't clear that your xticks are in any way tied to the actual joyplot itself (ie, you've created arbitrary x-ticks and placed them on the plot).

    Are tick marks not represented on the plot originally (similar plots I've seen all have them by default)?