Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libhts
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Blaise LI
libhts
Commits
ba8352b8
Commit
ba8352b8
authored
7 years ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Testing usage of tex formatting.
parent
96bef359
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libhts/libhts.py
+14
-0
14 additions, 0 deletions
libhts/libhts.py
with
14 additions
and
0 deletions
libhts/libhts.py
+
14
−
0
View file @
ba8352b8
...
@@ -15,7 +15,20 @@ import pandas as pd
...
@@ -15,7 +15,20 @@ import pandas as pd
from
scipy.stats.stats
import
pearsonr
,
linregress
from
scipy.stats.stats
import
pearsonr
,
linregress
# To compute geometric mean
# To compute geometric mean
from
scipy.stats.mstats
import
gmean
from
scipy.stats.mstats
import
gmean
import
matplotlib
as
mpl
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
# https://stackoverflow.com/a/42768093/1878788
from
matplotlib.backends.backend_pgf
import
FigureCanvasPgf
mpl
.
backend_bases
.
register_backend
(
'
pdf
'
,
FigureCanvasPgf
)
TEX_PARAMS
=
{
"
text.usetex
"
:
True
,
# use LaTeX to write all text
"
pgf.rcfonts
"
:
False
,
# Ignore Matplotlibrc
"
pgf.texsystem
"
:
"
lualatex
"
,
# hoping to avoid memory issues
"
pgf.preamble
"
:
[
r
'
\usepackage{color}
'
# xcolor for colours
]
}
mpl
.
rcParams
.
update
(
TEX_PARAMS
)
import
seaborn
as
sns
import
seaborn
as
sns
from
rpy2.robjects
import
r
,
pandas2ri
,
Formula
,
StrVector
from
rpy2.robjects
import
r
,
pandas2ri
,
Formula
,
StrVector
as_df
=
r
(
"
as.data.frame
"
)
as_df
=
r
(
"
as.data.frame
"
)
...
@@ -476,6 +489,7 @@ def plot_scatter(data,
...
@@ -476,6 +489,7 @@ def plot_scatter(data,
y_range
=
None
,
y_range
=
None
,
axes_style
=
None
):
axes_style
=
None
):
fig
,
ax
=
plt
.
subplots
()
fig
,
ax
=
plt
.
subplots
()
# ax.set_adjustable('box')
# First plot the data in grey
# First plot the data in grey
data
.
plot
.
scatter
(
data
.
plot
.
scatter
(
x
=
x_column
,
y
=
y_column
,
x
=
x_column
,
y
=
y_column
,
...
...
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