-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
191 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
|
||
.functionButton { | ||
border-width: 1px !important; | ||
border-radius: 3px !important; | ||
padding: 1px 7px; | ||
.little-pill { | ||
margin: 0px; | ||
padding: 0px; | ||
color: grey; | ||
font-size: 12px; | ||
} | ||
|
||
/* Hack for a bootstrap issue, which causes the !important on the .btn class to override | ||
this :checked selector - this selector and css is copied from the bootstrap css, with !important | ||
appended to each rule to ensure that it overrides the .btn class */ | ||
.btn-check:checked + .btn { | ||
color: var(--bs-btn-active-color) !important; | ||
background-color: var(--bs-btn-active-bg) !important; | ||
border-color: var(--bs-btn-active-border-color) !important; | ||
} | ||
.little-text { | ||
font-size: 16px; | ||
line-height: 1.4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,115 @@ | ||
import React from 'react'; | ||
import CodeChunk from '../components/CodeChunk'; | ||
|
||
export const functionDescriptions = { | ||
kdeplot: { | ||
description: '', | ||
docUrl: 'https://seaborn.pydata.org/generated/seaborn.kdeplot.html', | ||
basicUsage: '', | ||
parameters: [ | ||
{ name: "fill", description: 'color under the curve', type: 'boolean', relatedChart: '70_deffffed' }, | ||
{ name: "bw", description: 'control how density is computed', type: 'boolean', relatedChart: '70_deffffed' }, | ||
{ name: "color", description: 'control the color', type: 'boolean', relatedChart: '70_deffffed' } | ||
] | ||
}, | ||
violin: { | ||
description: '', | ||
docUrl: 'https://seaborn.pydata.org/generated/seaborn.violinplot.html', | ||
basicUsage: '', | ||
parameters: [ | ||
{ name: "width", description: 'color under the curve', type: 'boolean', relatedChart: '70_deffffed' }, | ||
{ name: "bw", description: 'control how density is computed', type: 'boolean', relatedChart: '70_deffffed' }, | ||
{ name: "color", description: 'controls the color', type: 'string', relatedChart: '70_deffffed' } | ||
] | ||
} | ||
} | ||
kdeplot: { | ||
description: ( | ||
<> | ||
<p> | ||
The <code>kdeplot()</code> function of{' '} | ||
<a href="https://python-graph-gallery.com/seaborn/">seaborn</a>{' '} | ||
generates Kernel Density Estimates to depict the probability density | ||
function of a continuous variable. It outputs a smoothed curve | ||
representing the distribution of the data. | ||
</p> | ||
</> | ||
), | ||
docUrl: 'https://seaborn.pydata.org/generated/seaborn.kdeplot.html', | ||
basicUsage: ( | ||
<CodeChunk> | ||
{` | ||
# library | ||
import seaborn as sns | ||
# Data | ||
df = sns.load_dataset('iris') | ||
# Default density plot | ||
sns.kdeplot(df['sepal_width']) | ||
`.trim()} | ||
</CodeChunk> | ||
), | ||
// PARAMETERS | ||
parameters: [ | ||
//////////////////////////////////////////////////////////////////////// | ||
{ | ||
name: 'fill', | ||
description: ( | ||
<p> | ||
<code>fill</code> controls the color under the curve. | ||
</p> | ||
), | ||
basicUsage: ( | ||
<CodeChunk hasWhiteBackground> | ||
{` | ||
sns.kdeplot(df['sepal_width'], color="purple") | ||
`.trim()} | ||
</CodeChunk> | ||
), | ||
type: ( | ||
<p> | ||
A string that provides the desired color. You can provide a name, | ||
some rgb, some hsl. Read this post to know more. | ||
</p> | ||
), | ||
img: '70_Basic_density_plot_Seaborn', | ||
post: '70-basic-density-plot-with-seaborn', | ||
}, | ||
//////////////////////////////////////////////////////////////////////// | ||
{ | ||
name: 'bw', | ||
description: ( | ||
<p> | ||
<code>bw</code> controls this amazing things | ||
</p> | ||
), | ||
basicUsage: ( | ||
<CodeChunk hasWhiteBackground> | ||
{` | ||
sns.kdeplot(df['sepal_width'], bw=72) | ||
`.trim()} | ||
</CodeChunk> | ||
), | ||
type: <p>I think it's a number but I'm not sure</p>, | ||
img: '73_Control_bandwidth_densityplot_Seaborn1', | ||
post: '70-basic-density-plot-with-seaborn', | ||
}, | ||
], | ||
}, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// VIOLIN | ||
// | ||
// | ||
// | ||
// | ||
// | ||
violin: { | ||
description: '', | ||
docUrl: 'https://seaborn.pydata.org/generated/seaborn.violinplot.html', | ||
basicUsage: '', | ||
parameters: [ | ||
{ | ||
name: 'width', | ||
description: 'color under the curve', | ||
type: 'boolean', | ||
relatedChart: '70_deffffed', | ||
}, | ||
{ | ||
name: 'bw', | ||
description: 'control how density is computed', | ||
type: 'boolean', | ||
relatedChart: '70_deffffed', | ||
}, | ||
{ | ||
name: 'color', | ||
description: 'controls the color', | ||
type: 'string', | ||
relatedChart: '70_deffffed', | ||
}, | ||
], | ||
}, | ||
}; |