Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
SOHViewer
Commits
69542f80
Commit
69542f80
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Patches
Plain Diff
for fixPoint=0, round to the decimal places that can show differences between max and min
parent
f1db24c8
No related branches found
No related tags found
1 merge request
!120
fixing displayed extreme values for channels
Pipeline
#2546
failed with stage
in 2 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/view/plotting/plotting_widget/plotting_axes.py
+12
-4
12 additions, 4 deletions
...tionviewer/view/plotting/plotting_widget/plotting_axes.py
with
12 additions
and
4 deletions
sohstationviewer/view/plotting/plotting_widget/plotting_axes.py
+
12
−
4
View file @
69542f80
...
...
@@ -278,9 +278,9 @@ class PlottingAxes:
ax
.
unit_bw
=
get_unit_bitweight
(
chan_db_info
,
self
.
main_window
.
bit_weight_opt
)
self
.
set_axes_ylim
(
ax
,
min_y
,
max_y
)
self
.
set_axes_ylim
(
ax
,
min_y
,
max_y
,
chan_db_info
)
def
set_axes_ylim
(
self
,
ax
,
min_y
,
max_y
):
def
set_axes_ylim
(
self
,
ax
,
org_
min_y
,
org_
max_y
,
chan_db_info
):
"""
Limit y range in min_y, max_y.
Set y tick labels at min_y, max_y
...
...
@@ -288,8 +288,16 @@ class PlottingAxes:
:param min_y: float - minimum of y values
:param max_y: float - maximum of y values
"""
min_y
=
round
(
min_y
,
2
)
max_y
=
round
(
max_y
,
2
)
min_y
=
round
(
org_min_y
,
7
)
max_y
=
round
(
org_max_y
,
7
)
if
chan_db_info
[
'
fixPoint
'
]
==
0
and
org_max_y
>
org_min_y
:
# if fixPoint=0, the format uses the save value created
# => try to round to to the point that user can see the differences
for
dec
in
range
(
2
,
8
,
1
):
min_y
=
round
(
org_min_y
,
dec
)
max_y
=
round
(
org_max_y
,
dec
)
if
max_y
>
min_y
:
break
if
max_y
>
min_y
:
# There are different values for y => show yticks for min, max
# separately
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment