Repository: pyqtgraph/pyqtgraph

Issue:
update version for new development and PlotDataItem stepMode fix
### Version 
PyPI version is 0.10.0 and uses the release code from november 2016, however the documentation (http://www.pyqtgraph.org/documentation/index.html) has the same version but is based on the development branch. This is very confusing (take for example _addMarker_ method of InfiniteLine).

### PlotDataItem fix
If _stepMode_ is True we get an exception in the _addPoints_ method of _ScatterPlotItem_ since X and Y axis length is not the same. The last X point is in this case excluded.




Discussion:
# [Codecov](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=h1) Report
> Merging [#684](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=desc) into [develop](https://codecov.io/gh/pyqtgraph/pyqtgraph/commit/e28b682222f3e13d5a6f9f2fd0c6c597c960d11b?src=pr&el=desc) will **decrease** coverage by `0.99%`.
> The diff coverage is `71.42%`.

[![Impacted file tree graph](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/graphs/tree.svg?width=650&src=pr&token=DcSjzPLFsk&height=150)](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##           develop     #684    +/-   ##
=========================================
- Coverage    35.66%   34.66%    -1%     
=========================================
  Files          199      208     +9     
  Lines        27398    28191   +793     
  Branches      4531     4550    +19     
=========================================
+ Hits          9771     9773     +2     
- Misses       16754    17538   +784     
- Partials       873      880     +7
```


| [Impacted Files](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pyqtgraph/graphicsItems/PlotDataItem.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2dyYXBoaWNzSXRlbXMvUGxvdERhdGFJdGVtLnB5) | `45.6% <100%> (ø)` | :arrow_up: |
| [pyqtgraph/graphicsItems/ScatterPlotItem.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2dyYXBoaWNzSXRlbXMvU2NhdHRlclBsb3RJdGVtLnB5) | `66.94% <66.66%> (-0.12%)` | :arrow_down: |
| [pyqtgraph/imageview/ImageViewTemplate\_pyqt.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2ltYWdldmlldy9JbWFnZVZpZXdUZW1wbGF0ZV9weXF0LnB5) | `0% <0%> (-98.7%)` | :arrow_down: |
| [pyqtgraph/Qt.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL1F0LnB5) | `58.82% <0%> (-5.43%)` | :arrow_down: |
| [pyqtgraph/widgets/DataFilterWidget.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL3dpZGdldHMvRGF0YUZpbHRlcldpZGdldC5weQ==) | `26.15% <0%> (-1.12%)` | :arrow_down: |
| [pyqtgraph/graphicsItems/ViewBox/ViewBoxMenu.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2dyYXBoaWNzSXRlbXMvVmlld0JveC9WaWV3Qm94TWVudS5weQ==) | `68.08% <0%> (-0.74%)` | :arrow_down: |
| [pyqtgraph/imageview/ImageView.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2ltYWdldmlldy9JbWFnZVZpZXcucHk=) | `36.3% <0%> (-0.3%)` | :arrow_down: |
| [pyqtgraph/graphicsItems/PlotItem/PlotItem.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2dyYXBoaWNzSXRlbXMvUGxvdEl0ZW0vUGxvdEl0ZW0ucHk=) | `40.67% <0%> (-0.11%)` | :arrow_down: |
| [pyqtgraph/graphicsItems/ViewBox/ViewBox.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2dyYXBoaWNzSXRlbXMvVmlld0JveC9WaWV3Qm94LnB5) | `57.31% <0%> (ø)` | :arrow_up: |
| [pyqtgraph/graphicsItems/ImageItem.py](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree#diff-cHlxdGdyYXBoL2dyYXBoaWNzSXRlbXMvSW1hZ2VJdGVtLnB5) | `53.68% <0%> (ø)` | :arrow_up: |
| ... and [16 more](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=footer). Last update [e28b682...a66817e](https://codecov.io/gh/pyqtgraph/pyqtgraph/pull/684?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@campagnola 
did you have time to look over this PR?
This is next on my list, but I need to work out how this change interacts with the automatic version handling in setup.py. Also, there appear to be unrelated changes to two files in this PR.
I've created the PR for the versioning issue.

In short time I found the PlotDataItem stepMode issue and pushed the changes to the same branch. Do you want to have separated PRs? 



Resolving patch:
diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py
--- a/pyqtgraph/graphicsItems/PlotDataItem.py
+++ b/pyqtgraph/graphicsItems/PlotDataItem.py
@@ -490,6 +490,9 @@ def updateItems(self):
             self.curve.hide()
         
         if scatterArgs['symbol'] is not None:
+            
+            if self.opts.get('stepMode', False) is True:
+                x = 0.5 * (x[:-1] + x[1:])                
             self.scatter.setData(x=x, y=y, **scatterArgs)
             self.scatter.show()
         else:


Test patch: