First, I apologize if this questions has already been asked, I couldn't find a solution at StackOverflow.
I'm plotting ECDFs using Seaborn, but for the latency my ECDFs does not show much information using the regular axis.
Example: non-log-axis
So I changed my script to make the x-axis logarithmic using ax.set_xscale('log'), but the result was cutoff.
I read this issue on GitHub, but since it's from a few years ago I wonder if it was solved.
Here's my code for completeness:
def plot_cdfs(df, legend, nodes, axes):
ax1, ax2, ax3, ax4 = axes
# redirecting subplot according to the number of nodes
if nodes == '25':
sns.kdeplot(df[header], cumulative=True, legend=False, ax=ax1)
ax1.set_ylabel('ECDF', fontsize=16)
ax1.set_title('25 Nodes')
ax1.set_xlabel(label)
ax1.set_xscale('log')
leg_handles = ax1.get_legend_handles_labels()[0]
ax1.legend(leg_handles, legend[::4])
elif nodes == '50':
sns.kdeplot(df[header], cumulative=True, legend=False, ax=ax2)
ax2.set_title('50 Nodes')
ax2.set_xlabel(label)
ax2.set_xscale('log')
elif nodes == '100':
sns.kdeplot(df[header], cumulative=True, legend=False, ax=ax3)
ax3.set_title('100 Nodes')
ax3.set_xlabel(label)
ax3.set_xscale('log')
else:
sns.kdeplot(df[header], cumulative=True, legend=False, ax=ax4)
ax4.set_title('150 Nodes')
ax4.set_xlabel(label)
ax4.set_xscale('log')
ax.set_xlim(1e-2, None). - ImportanceOfBeingErnest