Skip to content

[Term Entry] Plotly-Carpet() #6307

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

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 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
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)
35 changes: 0 additions & 35 deletions content/javascript/concepts/window/terms/resizeTo/resizeTo.md

This file was deleted.

59 changes: 59 additions & 0 deletions content/javascript/concepts/window/terms/scrollTo/scrollTo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
Title: '.scrollTo()'
Description: 'Scrolls document to specified coordinate in pixels'
Subjects:
- 'Computer Science'
- 'Web Development'
Tags:
- 'Arguments'
- 'Functions'
- 'Parameters'
CatalogContent:
- 'introduction-to-javascript'
- 'paths/front-end-engineer-career-path'
---

In JavaScript, **`.scrollTo()`** scrolls the window or document to a specified position in pixels.

## Syntax

```pseudo
window.scrollTo(x, y)
```

- `x`: The horizontal coordinate (in pixels) to scroll to.
- `y`: The vertical coordinate (in pixels) to scroll to.

Or, alternatively:

```pseudo
window.scrollTo(options)
```

- `options`: An object with the following optional properties:
- `left`: The horizontal scroll position in pixels.
- `top`: The vertical scroll position in pixels.
- `behavior`: Defines the scrolling behavior. Accepted values:
- `smooth`: Scrolls with an animation.
- `instant`: Scrolls immediately.
- `auto`: Uses the browser's default scrolling behavior.

## Example 1

The code below scrolls the window to _298_ pixels from the left (x-axis) and _57_ pixels from the top (y-axis) using absolute coordinates:

```js
window.scrollTo(298, 57);
```

## Example 2

The code below scrolls the window smoothly to _57_ pixels from the top (y-axis) and _298_ pixels from the left (x-axis) using the options object:

```js
window.scrollTo({
top: 57,
left: 298,
behavior: 'smooth',
});
```
50 changes: 50 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,50 @@
---
Title: '.Carpet()'
Description: 'Creates visualization technique that displays interaction between variables'
Subjects:
- 'Data Science'
- 'Data Visualization'
Tags:
- 'Data'
- 'Finance'
- 'Plotly'
- 'Graphs'
- 'Data Visualization'
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.

## 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.

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

## Example

```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()
```

**Output**
![.Carpet() showing the output of thge above 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"
}