Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
100628dd
Commit
100628dd
authored
Dec 18, 2013
by
panos
Committed by
Jérome Perrin
Jan 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Insert Barplot in Plots script
parent
8db51226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
dream/simulation/outputanalysis/Plots.py
dream/simulation/outputanalysis/Plots.py
+17
-5
No files found.
dream/simulation/outputanalysis/Plots.py
View file @
100628dd
...
...
@@ -48,15 +48,15 @@ class Graphs:
rdev
=
robjects
.
r
[
'dev.off'
]
rjpeg
=
robjects
.
r
[
'jpeg'
]
output
=
rjpeg
(
fileName
)
#Graph data samples and define color and type for the data points visualization
rplot
(
data1
,
data2
,
main
=
'Scatterplot'
,
xlab
=
"data1"
,
ylab
=
'data2'
,
pch
=
19
)
output
=
rjpeg
(
fileName
)
rplot
(
data1
,
data2
,
main
=
'Scatterplot'
,
xlab
=
"data1"
,
ylab
=
'data2'
,
pch
=
19
)
#Graph data samples and define type for the data points visualization
rdev
return
output
def
Histogram
(
data
,
fileName
=
"histogram.jpg"
):
data
=
robjects
.
FloatVector
(
data
)
#The given list
s
change into float vector in order to be handled by RPy2
def
Histogram
(
self
,
data
,
fileName
=
"histogram.jpg"
):
data
=
robjects
.
FloatVector
(
data
)
#The given list change into float vector in order to be handled by RPy2
rhist
=
robjects
.
r
[
'hist'
]
rhist
=
robjects
.
r
[
'hist'
]
#Call hist function - R function
rdev
=
robjects
.
r
[
'dev.off'
]
rjpeg
=
robjects
.
r
[
'jpeg'
]
output
=
rjpeg
(
fileName
)
...
...
@@ -65,6 +65,18 @@ class Graphs:
rdev
return
output
def
Barplot
(
data
,
fileName
=
"barplot.jpg"
):
data
=
robjects
.
FloatVector
(
data
)
#The given list changes into float vector in order to be handled by RPy2
rbarplot
=
robjects
.
r
[
'barplot'
]
#Call barplot - R function
rdev
=
robjects
.
r
[
'dev.off'
]
rjpeg
=
robjects
.
r
[
'jpeg'
]
output
=
rjpeg
(
fileName
)
rbarplot
(
data
,
main
=
'Barplot'
,
border
=
'blue'
)
#Create a bar plot for the given data sample
rdev
return
output
def
Pie
(
self
,
data1
,
fileName
=
"pieChart.jpg"
):
data1
=
robjects
.
FloatVector
(
data1
)
#The given list changes into float vector in order to be handled by RPy2
rpaste
=
robjects
.
r
[
'paste'
]
#Call paste - R function
...
...
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