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
dbcdf7ec
Commit
dbcdf7ec
authored
Jul 27, 2010
by
Luke Campagnola
Browse files
little fix --plots may contain nans now
parent
fac29dc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
graphicsItems.py
View file @
dbcdf7ec
...
...
@@ -376,8 +376,9 @@ class PlotCurveItem(GraphicsObject):
if
self
.
xData
is
None
:
return
(
None
,
None
)
if
self
.
xDisp
is
None
:
x
=
self
.
xData
y
=
self
.
yData
nanMask
=
isnan
(
self
.
xData
)
|
isnan
(
self
.
yData
)
x
=
self
.
xData
[
~
nanMask
]
y
=
self
.
yData
[
~
nanMask
]
ds
=
self
.
opts
[
'downsample'
]
if
ds
>
1
:
x
=
x
[::
ds
]
...
...
@@ -592,6 +593,8 @@ class PlotCurveItem(GraphicsObject):
xmax
=
x
.
max
()
+
pixels
[
0
].
x
()
*
lineWidth
ymin
=
y
.
min
()
-
abs
(
pixels
[
1
].
y
())
*
lineWidth
ymax
=
y
.
max
()
+
abs
(
pixels
[
1
].
y
())
*
lineWidth
return
QtCore
.
QRectF
(
xmin
,
ymin
,
xmax
-
xmin
,
ymax
-
ymin
)
def
paint
(
self
,
p
,
opt
,
widget
):
...
...
Write
Preview
Supports
Markdown
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