-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Term Entry]Python plotly graph carpet( #6308
base: main
Are you sure you want to change the base?
Changes from 43 commits
2f3f8ae
27a255f
a95f03f
b25286e
6e8c42e
2f897ea
419eb5b
9493778
8798cad
bdb981d
6c82441
a9c34bc
4ba5aa2
93fa864
ebe7ef9
8aa030a
e5d1671
9c14c63
48d07a7
6f55017
9dc4eec
4dc0d41
74d7ece
312a3b2
b22248d
93c8872
bb54868
89747f1
381774d
0bd7aa2
fa9f1bb
f6bcd99
bd4fbf6
2ecaacd
58eeb32
97de14a
77fdad5
02c657b
639fa45
5d69719
7f44992
6de0a79
71da2e5
b622fdd
4aa0ca3
8eb79ef
6ba4961
a1f8c08
44f8569
1e50d0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
Title: '.getElementById' | ||
Description: 'Returns the element objects representing element whose id property matches the string provided.' | ||
Subjects: | ||
- 'Computer Science' | ||
- 'Game Development' | ||
- 'Web Development' | ||
- 'Web Design' | ||
Tags: | ||
- 'Arguments' | ||
- 'Functions' | ||
- 'Parameters' | ||
CatalogContent: | ||
- 'introduction-to-javascript' | ||
- 'paths/front-end-engineer-career-path' | ||
--- | ||
|
||
In javascript, the **_getElementById()_** method of the `Document` interface returns an `Element` object representing the element whose `id` property matches the specified string. | ||
|
||
## Syntax | ||
|
||
```pseudo | ||
document.getElementById(id) | ||
``` | ||
|
||
-`id`:is the ID of the element to locate. Within the document, the ID is case_sensititve and should be unique to just one element. | ||
|
||
## Example | ||
|
||
```HTML | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<h1 id="atd">Codecademy</h1> | ||
<h2>The getElementById() Method</h2> | ||
|
||
<script> | ||
const myElement = document.getElementById("atd"); | ||
myElement.style.color = "blue"; | ||
</script> | ||
|
||
</body> | ||
</html> | ||
|
||
``` | ||
|
||
- `Result`: | ||
|
||
- The example will display the element with a matching string `id` _atd_ as blue. | ||
|
||
- `Output`: | ||
|
||
 |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,51 @@ | ||||||||||||||||||||||
--- | ||||||||||||||||||||||
Title: '.Carpet()' | ||||||||||||||||||||||
Description: 'Creates visualization technique that displays interaction between variables' | ||||||||||||||||||||||
Subjects: | ||||||||||||||||||||||
- 'Data Science' | ||||||||||||||||||||||
- 'Data Visualization' | ||||||||||||||||||||||
Tags: | ||||||||||||||||||||||
- 'Data' | ||||||||||||||||||||||
- 'Finance' | ||||||||||||||||||||||
- 'Plotly' | ||||||||||||||||||||||
- 'Graphs' | ||||||||||||||||||||||
- 'Data Visualization' | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
CatalogContent: | ||||||||||||||||||||||
- 'learn-python-3' | ||||||||||||||||||||||
- 'paths/data-visualization' | ||||||||||||||||||||||
--- | ||||||||||||||||||||||
|
||||||||||||||||||||||
The **`.Carpet()`** , which is referred specifically as "carpet plot", is a Plotly function used to display interaction between one or more independent variables and one or more dependent variable in a two-dimensional plot. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
## Syntax | ||||||||||||||||||||||
|
||||||||||||||||||||||
```pseudo | ||||||||||||||||||||||
plotly.graph_objects.Carpet(a=None,b=None,x=None, y=None, ...) | ||||||||||||||||||||||
|
||||||||||||||||||||||
``` | ||||||||||||||||||||||
|
||||||||||||||||||||||
- `a`: First parameter values as an array | ||||||||||||||||||||||
- `b`: Second parameter values as an array. | ||||||||||||||||||||||
- `x`: (optional) It is a two dimensional x-coordinates at each carpet point and when omitted, the plot is a cheater plot and x-axis is hidden by default | ||||||||||||||||||||||
- `y` : It is a two dimensional y-coordinates at each carpet point. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
- The ellipses is an indication of optional paratemeters that can be added. | ||||||||||||||||||||||
|
||||||||||||||||||||||
## Example | ||||||||||||||||||||||
|
||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
```py | ||||||||||||||||||||||
from plotly import graph_objects as go | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
fig = go.Figure(go.Carpet( | ||||||||||||||||||||||
a = [4, 4, 4, 6.5, 6.5, 6.5, 5, 5, 5, 8, 8, 8], | ||||||||||||||||||||||
b = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3], | ||||||||||||||||||||||
y = [2, 3.5, 4, 3, 4.5, 5, 5.5, 6.5, 7.5, 8, 8.5, 10], | ||||||||||||||||||||||
)) | ||||||||||||||||||||||
|
||||||||||||||||||||||
fig.show() | ||||||||||||||||||||||
``` | ||||||||||||||||||||||
|
||||||||||||||||||||||
The above code generates the following output: | ||||||||||||||||||||||
|
||||||||||||||||||||||
 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,5 +40,6 @@ | |
"validate-content-tree": "node .github/scripts/validate-content-tree.js" | ||
}, | ||
"license": "UNLICENSED", | ||
"version": "1.0.0" | ||
"version": "1.0.0", | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.