I am trying to reproduce the table/figure in this CMU Machine Learning lecture.
per doc, params xerr, yerr in matplotlib.pyplot.bar is to add horizontal / vertical errorbars to the bar tips.
what is a bar tip? is it somewhere on the top of the bar? I searched and didn't find anything related.
Bar tips means the end of the bar. Think "fingertips". The errorbars will appear on the end of the bar with half on the bar the other half off the bar. The tip of the bar.
Related
I would like to have a horizontal scroll bar and zoom bar for this QChartView containing a QBarSeries from PyQtChart library because the bars displayed inside the QChartView get compressed as the number of data to visualize increases. Thus, I would like to have a fixed size for each bar plot for them not to be compressed and can be viewed along with horizontal scroll bar and zoom bar. This image shows the problem of having too much data to visualize in my case. May I ask if there is anything I can do to achieve my goal? Any response would be highly appreciated. Thank you very much!
I tried searching for similar problems but unfortunately, I did not find one. Although I was able to find similar problems, they were written using C++ which I am not familiar of.
I'm learning Matplotlib and trying to understand this piece of code.
As part of an exercise, I need to figure out how to place the bar to the left side of the pie.
Can anyone help?
How can I add vertical scroll bar on horizontal bar chart on plotly? (other open source libraries are also welcome)
I have thousands of horizontal bars in my chart, so I want to scroll up/down on this with a good design.
At the end I want to achieve a plot like below;
this is a draft of the output i would like, made by me on draw.io
Basically my conditions are:
(1) A bar may not start on the first value of the axis Y
(2) The bars are calculated for a interval, so if possible drawing the bars 'inside' that interval
(3) A bar may not have values for a interval, so it's not drawn
Finally, i believe 2 and 3 are possible, but 1 is it? And shall i approach it as a histogram, a bar chart or a box plot? Or maybe a mix? (i am pretty newbie on matplolib)
Any question ask, and thanks.
You can manually draw rectangles with matplotlib, so it's not a problem to support (1), (2) and (3) at the same time :)
https://matplotlib.org/api/_as_gen/matplotlib.patches.Rectangle.html
I am using the pandas plot facilities, to plot a bar plot:
spy_price_data.iloc[40:,1].plot(kind='bar')
The bar data is plotted correctly, but the figure contains weird artefacts in the form of additional horizontal bars below the actual figure:
What could be the problem here?
The 'weird artefacts' are your ticklabels. You can even (almost) read them at the end:
The last value seems to say something like 2018-08-19 20:00:00.
To make the plot more readable, take a look at the answer from ImportanceOfBeingErnest to the question Matplotlib: How to increase space between tickmarks (or reduce number of tickmarks)?