Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pyLIAF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Nunez Barreto
pyLIAF
Commits
fcb9d140
Commit
fcb9d140
authored
Jun 14, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agrego opcion de ancho de bin en applet histogram
parent
bab947dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
histogram.py
pyLIAF/artiq/applets/histogram.py
+10
-2
No files found.
pyLIAF/artiq/applets/histogram.py
View file @
fcb9d140
...
@@ -19,11 +19,17 @@ class MakeHistogramAndPlot(pyqtgraph.PlotWidget):
...
@@ -19,11 +19,17 @@ class MakeHistogramAndPlot(pyqtgraph.PlotWidget):
y
=
y
[
~
np
.
isnan
(
y
)]
y
=
y
[
~
np
.
isnan
(
y
)]
#print(self.args.x)
#print(self.args.x)
#if len(y[~np.isnan(y)]) > 5: return
#if len(y[~np.isnan(y)]) > 5: return
if
self
.
args
.
x
is
None
:
if
self
.
args
.
x
is
None
:
x
=
'auto'
if
self
.
args
.
binw
is
None
:
x
=
'auto'
else
:
binw
=
float
(
self
.
args
.
binw
)
x
=
np
.
arange
(
y
.
min
(),
y
.
max
()
+
2
*
binw
,
binw
)
else
:
else
:
x
=
data
[
self
.
args
.
x
][
1
]
x
=
data
[
self
.
args
.
x
][
1
]
except
KeyError
:
except
KeyError
as
e
:
raise
e
return
return
# This makes the histogram with the full datasets
# This makes the histogram with the full datasets
...
@@ -39,7 +45,9 @@ class MakeHistogramAndPlot(pyqtgraph.PlotWidget):
...
@@ -39,7 +45,9 @@ class MakeHistogramAndPlot(pyqtgraph.PlotWidget):
def
main
():
def
main
():
applet
=
TitleApplet
(
MakeHistogramAndPlot
)
applet
=
TitleApplet
(
MakeHistogramAndPlot
)
applet
.
add_dataset
(
"y"
,
"Y values"
)
applet
.
add_dataset
(
"y"
,
"Y values"
)
applet
.
add_dataset
(
"binw"
,
"Bin widths"
,
required
=
False
)
applet
.
add_dataset
(
"x"
,
"Bin boundaries"
,
required
=
False
)
applet
.
add_dataset
(
"x"
,
"Bin boundaries"
,
required
=
False
)
# applet.add_dataset("binw", "Bin widths", required=False)
applet
.
run
()
applet
.
run
()
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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