Pandas transforming hbar in line
<p>I have a pandas hbar plot, but I would like to have a line instead of the bars (just a line going to the top of the bars).</p>

<p>Is that possible? </p>

<p>I have </p>

<pre><code>b3["R2_foret"].plot(legend=False, kind='barh')    
</code></pre>

<p>which gives me</p>

<p><a href="https://i.stack.imgur.com/4WdaZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4WdaZ.png" alt="enter image description here"></a></p>

<p>I would like not to see all this blue, but just a line going from one value to the next one.
The issue is to make a vertical line.</p>

<h1>EDIT</h1>

<p>Following the here below solution by unutbu, with alpha=0</p>

<pre><code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

b3 = pd.DataFrame({'R2_foret': [0.79381443298969068, 0.7766323024054983, 0.7903780068728522, 0.78006872852233677, 0.79725085910652915, 0.79725085910652915, 0.8041237113402061, 0.7903780068728522, 0.7903780068728522, 0.81443298969072153, 0.80068728522336763, 0.80756013745704458, 0.85567010309278368, 0.8556701030927838, 0.87628865979381465, 0.84536082474226804, 0.86597938144329922, 0.87628865979381454, 0.85910652920962216, 0.85910652920962227, 0.87579774177712344, 0.87628865979381465, 0.84536082474226792, 0.86597938144329922, 0.87628865979381454, 0.88316151202749149, 0.89347079037800703, 0.90378006872852246, 0.90378006872852246, 0.90034364261168398, 0.9106529209621993, 0.90378006872852246, 0.90721649484536093, 0.9101620029455082, 0.9106529209621993, 0.92096219931271495, 0.90721649484536093, 0.92096219931271495, 0.92096219931271495, 0.91408934707903777]}) 

b3['y'] = np.arange(len(b3))
ax = b3.plot(x='R2_foret', y='y', style=['-'])
b3['R2_foret'].plot(kind='barh', ax=ax, alpha=0)
plt.xlim(0,1)
plt.tick_params(left='off', labelleft='off')
plt.show()
</code></pre>

<p><a href="https://i.stack.imgur.com/nOt25.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nOt25.png" alt="enter image description here"></a></p>