Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
StdInPlot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
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
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
technasium
StdInPlot
Commits
38481d4f
Commit
38481d4f
authored
1 year ago
by
Tammo Jan Dijkema
Browse files
Options
Downloads
Patches
Plain Diff
Fix formatting
parent
6ffbfabc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
power_plot.py
+7
-5
7 additions, 5 deletions
power_plot.py
with
7 additions
and
5 deletions
power_plot.py
+
7
−
5
View file @
38481d4f
...
...
@@ -14,8 +14,7 @@ import matplotlib
import
matplotlib.pyplot
as
plt
from
matplotlib.widgets
import
Button
,
CheckButtons
from
matplotlib.collections
import
LineCollection
from
matplotlib.ticker
import
FuncFormatter
from
matplotlib.dates
import
HourLocator
,
date2num
,
num2date
,
AutoDateLocator
from
matplotlib.dates
import
date2num
,
num2date
,
AutoDateFormatter
from
matplotlib.figure
import
Figure
from
PyQt5.QtWidgets
import
QApplication
,
QMainWindow
,
QVBoxLayout
,
QWidget
,
QComboBox
...
...
@@ -42,10 +41,13 @@ class PowerPlot:
self
.
ax
.
set_xlabel
(
"
Time (UTC)
"
)
self
.
ax
.
set_ylabel
(
yname
)
self
.
ax
.
xaxis_date
()
formatter
=
AutoDateFormatter
(
self
.
ax
.
xaxis
.
get_major_locator
())
formatter
.
scaled
[
1
/
(
24
*
60
)]
=
"
%H:%M
"
self
.
ax
.
xaxis
.
set_major_formatter
(
formatter
)
self
.
min
,
self
.
max
=
None
,
None
self
.
ax
.
xaxis
.
set_major_formatter
(
FuncFormatter
(
lambda
x
,
pos
:
f
"
{
num2date
(
x
)
:
%
H
:
%
M
}
"
)
)
fig
.
suptitle
(
yname
,
fontsize
=
16
)
fig
.
tight_layout
()
(
self
.
totalplot
,)
=
self
.
ax
.
plot
([],
[],
"
.
"
,
color
=
"
blue
"
)
...
...
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