Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Merge requests
!256
Add button to recompute the plot limits
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add button to recompute the plot limits
relim
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Oscar Gustafsson
requested to merge
relim
into
master
2 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Viewing commit
d0b7c72f
Show latest version
1 file
+
12
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
d0b7c72f
Add button to recompute the plot limits
· d0b7c72f
Oscar Gustafsson
authored
2 years ago
b_asic/gui_utils/plot_window.py
+
12
−
0
Options
@@ -147,10 +147,15 @@ class PlotWindow(QDialog):
# self.ontop_checkbox.setCheckState(Qt.CheckState.Unchecked)
# listlayout.addWidget(self.ontop_checkbox)
relim_button
=
QPushButton
(
"
&Recompute limits
"
)
relim_button
.
clicked
.
connect
(
self
.
_relim
)
listlayout
.
addWidget
(
relim_button
)
# Add "Close" buttons
button_close
=
QPushButton
(
"
&Close
"
,
self
)
button_close
.
clicked
.
connect
(
self
.
close
)
listlayout
.
addWidget
(
button_close
)
self
.
_relim
()
# Done. Tell the functions below to redraw the canvas when needed.
# self.plotcanvas.draw()
@@ -197,6 +202,13 @@ class PlotWindow(QDialog):
if
self
.
_auto_redraw
:
self
.
_update_legend
()
def
_relim
(
self
,
event
=
None
):
self
.
_plot_axes
.
relim
(
True
)
self
.
_plot_axes
.
autoscale
(
True
)
self
.
_plot_axes
.
autoscale
(
axis
=
'
x
'
,
tight
=
True
)
self
.
_plot_axes
.
autoscale
(
axis
=
'
y
'
)
self
.
_plot_canvas
.
draw
()
def
start_simulation_dialog
(
sim_results
:
Dict
[
str
,
List
[
complex
]],
sfg_name
:
Optional
[
str
]
=
None
Loading