11---
22jupyter :
3+ celltoolbar : Tags
34 jupytext :
45 notebook_metadata_filter : all
56 text_representation :
@@ -20,9 +21,8 @@ jupyter:
2021 name : python
2122 nbconvert_exporter : python
2223 pygments_lexer : ipython3
23- version : 3.9.6
24+ version : 3.9.7
2425 plotly :
25- # description:
2626 display_as : bio
2727 language : python
2828 layout : base
@@ -33,105 +33,49 @@ jupyter:
3333 thumbnail : thumbnail/volcano-plot.png
3434---
3535
36- ## Default VolcanoPlot
36+ ## VolcanoPlot
3737An example of a default VolcanoPlot component without any extra properties.
3838
3939
4040``` python
41- from jupyter_dash import JupyterDash
42-
4341import pandas as pd
44- from dash.dependencies import Input, Output
45- import dash_bio as dashbio
46- from dash import html
47- from dash import dcc
42+ import dash_bio
4843
49- app = JupyterDash(__name__ )
5044
5145df = pd.read_csv(
5246 ' https://raw.githubusercontent.com/plotly/dash-bio-docs-files/master/' +
5347 ' volcano_data1.csv'
5448)
5549
56- app.layout = html.Div([
57- ' Effect sizes' ,
58- dcc.RangeSlider(
59- id = ' default-volcanoplot-input' ,
60- min = - 3 ,
61- max = 3 ,
62- step = 0.05 ,
63- marks = {i: {' label' : str (i)} for i in range (- 3 , 3 )},
64- value = [- 0.5 , 1 ]
65- ),
66- html.Br(),
67- html.Div(
68- dcc.Graph(
69- id = ' dashbio-default-volcanoplot' ,
70- figure = dashbio.VolcanoPlot(
71- dataframe = df
72- )
73- )
74- )
75- ])
76-
77- @app.callback (
78- Output(' dashbio-default-volcanoplot' , ' figure' ),
79- Input(' default-volcanoplot-input' , ' value' )
50+ dash_bio.VolcanoPlot(
51+ dataframe = df,
8052)
81- def update_volcanoplot (effects ):
82- return dashbio.VolcanoPlot(
83- dataframe = df,
84- genomewideline_value = 2.5 ,
85- effect_size_line = effects
86- )
87-
88- app.run_server(mode = " inline" )
8953```
9054
9155## Point Sizes And Line Widths
9256Change the size of the points on the scatter plot, and the widths of the effect lines and genome-wide line.
9357
9458
9559``` python
96- from jupyter_dash import JupyterDash
97-
9860import pandas as pd
99- from dash import dcc
10061import dash_bio as dashbio
10162
102- app = JupyterDash(__name__ )
103-
10463df = pd.read_csv(' https://raw.githubusercontent.com/plotly/dash-bio-docs-files/master/volcano_data1.csv' )
10564
106- app.layout = dcc.Graph( figure = dashbio.VolcanoPlot(
65+ dashbio.VolcanoPlot(
10766 dataframe = df,
10867 point_size = 10 ,
10968 effect_size_line_width = 4 ,
11069 genomewideline_width = 2
111- ))
112-
113- app.run_server(mode = " inline" )
70+ )
11471```
11572
116- ``` python
117- from jupyter_dash import JupyterDash
118-
119- import pandas as pd
120- from dash import dcc
121- import dash_bio as dashbio
122-
123- app = JupyterDash(__name__ )
73+ ## VolcanoPlot with Dash
12474
125- df = pd.read_csv(' https://raw.githubusercontent.com/plotly/dash-bio-docs-files/master/volcano_data1.csv' )
126-
127- app.layout = dcc.Graph(figure = dashbio.VolcanoPlot(
128- dataframe = df,
129- point_size = 10 ,
130- effect_size_line_width = 4 ,
131- genomewideline_width = 2
132- ))
133-
134- app.run_server(mode = " inline" )
75+ ``` python
76+ from IPython.display import IFrame
77+ snippet_url = ' https://dash-gallery.plotly.host/python-docs-dash-snippets/'
78+ IFrame(snippet_url + ' bio-volcano' , width = ' 100%' , height = 630 )
13579```
13680
13781## VolcanoPlot Properties
@@ -180,3 +124,7 @@ app.run_server(mode="inline")
180124** xlabel** (_ string_ ; optional): Label of the x axis.
181125
182126** ylabel** (_ string_ ; default ` '-log10(p)' ` ): Label of the y axis.
127+
128+ ``` python
129+
130+ ```
0 commit comments