Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Jakimow
EO Time Series Viewer
Commits
ee89b291
Commit
ee89b291
authored
Mar 28, 2013
by
Luke Campagnola
Browse files
Axis line can optionally stop at the last tick
parent
829503f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyqtgraph/graphicsItems/AxisItem.py
View file @
ee89b291
...
...
@@ -383,7 +383,8 @@ class AxisItem(GraphicsWidget):
picture
=
QtGui
.
QPicture
()
painter
=
QtGui
.
QPainter
(
picture
)
specs
=
self
.
generateDrawSpecs
(
painter
)
self
.
drawPicture
(
painter
,
*
specs
)
if
specs
is
not
None
:
self
.
drawPicture
(
painter
,
*
specs
)
finally
:
painter
.
end
()
self
.
picture
=
picture
...
...
@@ -646,12 +647,16 @@ class AxisItem(GraphicsWidget):
## determine mapping between tick values and local coordinates
dif
=
self
.
range
[
1
]
-
self
.
range
[
0
]
if
axis
==
0
:
x
S
cale
=
-
bounds
.
height
()
/
dif
offset
=
self
.
range
[
0
]
*
xScale
-
bounds
.
height
()
if
dif
==
0
:
x
s
cale
=
1
offset
=
0
else
:
xScale
=
bounds
.
width
()
/
dif
offset
=
self
.
range
[
0
]
*
xScale
if
axis
==
0
:
xScale
=
-
bounds
.
height
()
/
dif
offset
=
self
.
range
[
0
]
*
xScale
-
bounds
.
height
()
else
:
xScale
=
bounds
.
width
()
/
dif
offset
=
self
.
range
[
0
]
*
xScale
xRange
=
[
x
*
xScale
-
offset
for
x
in
self
.
range
]
xMin
=
min
(
xRange
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment