Skip to content
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

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2f3f8ae
Created a jupyter notebook extesion entry
aatidua Jan 24, 2025
27a255f
Created jupyter notebook extensions entry
aatidua Jan 24, 2025
a95f03f
Update jupyter-notebook-extensions.md
aatidua Jan 24, 2025
b25286e
Definition and some examples updated
aatidua Feb 2, 2025
6e8c42e
Inhave the definition, examples and installation for review
aatidua Feb 5, 2025
2f897ea
Merge branch 'main' into jupyter-extensions-entry
aatidua Feb 5, 2025
419eb5b
Update jupyter-notebook-extensions.md
PragatiVerma18 Feb 7, 2025
9493778
Merge branch 'main' into jupyter-extensions-entry
PragatiVerma18 Feb 7, 2025
8798cad
Update jupyter-notebook-extensions.md
mamtawardhani Feb 7, 2025
bdb981d
Update jupyter-notebook-extensions.md
mamtawardhani Feb 7, 2025
6c82441
Just the beginning of the resizeTo input
aatidua Feb 15, 2025
a9c34bc
It needs to be checked for update
aatidua Feb 15, 2025
4ba5aa2
Merge branch 'main' into javascript-entry
aatidua Feb 15, 2025
93fa864
Merge branch 'main' into javascript-entry
mamtawardhani Feb 16, 2025
ebe7ef9
I have made the improvements
aatidua Feb 16, 2025
8aa030a
Merge branch 'Codecademy:main' into javascript-entry
aatidua Feb 16, 2025
e5d1671
Fix formatting and run script
aatidua Feb 16, 2025
9c14c63
minor fixes
mamtawardhani Feb 17, 2025
48d07a7
Merge branch 'main' into javascript-entry
mamtawardhani Feb 17, 2025
6f55017
Merge branch 'main' into javascript-entry
Sriparno08 Feb 18, 2025
9dc4eec
Minor changes
Sriparno08 Feb 18, 2025
4dc0d41
The folder and the markdown file for scrollTo has started
aatidua Feb 21, 2025
74d7ece
Pseudo code and explanation to variables added
aatidua Feb 22, 2025
312a3b2
ScrollTo.md have been done and needs review
aatidua Feb 22, 2025
b22248d
minor changes
mamtawardhani Feb 24, 2025
93c8872
Merge branch 'main' into javascript-scrollTo-entry
mamtawardhani Feb 24, 2025
bb54868
resizeTo.md has been deleted from the bracnh
aatidua Feb 24, 2025
89747f1
Started the getelementbyid task
aatidua Mar 1, 2025
381774d
resolving error with id
aatidua Mar 2, 2025
0bd7aa2
trying to upload raw data
aatidua Mar 2, 2025
fa9f1bb
Trying to upload the png file
aatidua Mar 2, 2025
f6bcd99
Fixing the image upload
aatidua Mar 2, 2025
bd4fbf6
ready for review
aatidua Mar 2, 2025
2ecaacd
started teh carpet() entry
aatidua Mar 4, 2025
58eeb32
Carpet() is started
aatidua Mar 4, 2025
97de14a
updating carpet
aatidua Mar 4, 2025
77fdad5
Nearly done with carpet()
aatidua Mar 9, 2025
02c657b
Nearly done with carpet
aatidua Mar 9, 2025
639fa45
edited and hopefully no mistake
aatidua Mar 9, 2025
5d69719
Sending for review
aatidua Mar 9, 2025
7f44992
Trying to resolve conflict
aatidua Mar 9, 2025
6de0a79
hoping it works
aatidua Mar 9, 2025
71da2e5
What is going on
aatidua Mar 9, 2025
b622fdd
unwanted files deleted
aatidua Mar 12, 2025
4aa0ca3
Hopefully it works
aatidua Mar 12, 2025
8eb79ef
Updating recommended changes
aatidua Mar 16, 2025
6ba4961
Merge branch 'main' into python-plotly-graph-carpet
aatidua Mar 16, 2025
a1f8c08
delete unwanted
aatidua Mar 14, 2025
44f8569
hopedully not messing up
aatidua Mar 14, 2025
1e50d0d
Update jupyter-notebook-extensions.md
mamtawardhani Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`:

![Display of color of an element after getElementById() method](../../../../../../media/getelementbyid.png)
4 changes: 4 additions & 0 deletions content/javascript/concepts/window/terms/scrollTo/scrollTo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
Title: '.scrollTo()'
<<<<<<< HEAD
Description: 'Scrolls document to specified coordinate in pixels'
=======
Description: 'Scrolls document to specified coordinate in pixels.'
>>>>>>> main
Subjects:
- 'Computer Science'
- 'Web Development'
Expand Down
51 changes: 51 additions & 0 deletions content/plotly/concepts/graph-objects/terms/carpet/carpet.md
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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Description: 'Creates visualization technique that displays interaction between variables'
Description: 'Creates a grid-based reference for visualizing data in a non-Cartesian coordinate system.'

Subjects:
- 'Data Science'
- 'Data Visualization'
Tags:
- 'Data'
- 'Finance'
- 'Plotly'
- 'Graphs'
- 'Data Visualization'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'Data'
- 'Finance'
- 'Plotly'
- 'Graphs'
- 'Data Visualization'
- 'Data'
- 'Data Visualization'
- 'Finance'
- 'Graphs'
- 'Plotly'

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
The **`.Carpet()`** function in Plotly is used to create a carpet plot, which provides a grid-based reference for visualizing the relationship between one or more independent variables and one or more dependent variables in a two-dimensional, non-Cartesian coordinate system.


## 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.
- `a`: First independent variable values as an array.
- `b`: Second independent variable values as an array.
- `x` (optional): Specifies the x-coordinates of the carpet grid in Cartesian space. If omitted, the plot becomes a cheater plot, and the x-axis is hidden by default.
- `y` (optional): Specifies the y-coordinates of the carpet grid in Cartesian space.


- The ellipses is an indication of optional paratemeters that can be added.

## Example

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The example below demonstrates the use of `.Carpet()` function:

```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:

![The output of the .Carpet() plot](../../../../../../media/carpet_plot.png)
Binary file added media/carpet_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/getelementbyid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Loading