Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CS_4624_Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nickgrifasi
CS_4624_Project
Commits
bb31d7a0
Commit
bb31d7a0
authored
1 year ago
by
nickgrifasi
Browse files
Options
Downloads
Patches
Plain Diff
python visualization added to pyscript
parent
ed805a6c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyscript.html
+58
-44
58 additions, 44 deletions
pyscript.html
with
58 additions
and
44 deletions
pyscript.html
+
58
−
44
View file @
bb31d7a0
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title></title>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
</head>
<body>
</body>
</html>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title></title>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"https://pyscript.net/alpha/pyscript.css"
/>
<script
defer
src=
"https://pyscript.net/alpha/pyscript.js"
></script>
<py-env>
- matplotlib
- pandas
- paths:
- ./InteractionPrototype.csv_merged_result_unannotated.csv
</py-env>
</head>
<body>
<div
id=
"matplotlib-lineplot"
>
</div>
<py-script
output=
"matplotlib-lineplot"
>
# Python Code
#importing pandas
import pandas
df = pandas.read_csv('./InteractionPrototype.csv_merged_result_unannotated.csv')
# importing the matplotlib library
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
# x axis
x = ["FF Event", "Document Event", "Other Event", "Window Event"]
# y axis
y = [10, 5, 9, 7]
plt.plot(x, y, marker='o', linestyle='-', color='b')
# Naming the x-label
plt.xlabel('Event Names')
# Naming the y-label
plt.ylabel('Num Events')
# Naming the title of the plot
plt.title('Event Name vs Num Events')
fig
</py-script>
<link
rel=
"stylesheet"
href=
"https://pyscript.net/alpha/pyscript.css"
/>
<script
defer
src=
"https://pyscript.net/alpha/pyscript.js"
></script>
<div
id=
"matplotlib-bar"
></div>
<py-script
output=
"matplotlib-bar"
>
# Python Code
# importing the matplotlib library
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
# x axis
x = ["Away Time", "Reading Time", "Other"]
# y axis
y = [300, 520, 60]
plt.bar(x, y)
# Naming the x-label
plt.xlabel('Time Type')
# Naming the y-label
plt.ylabel('Score')
# Naming the title of the plot
plt.title('Time Type vs Time')
fig
</py-script>
<body>
<py-script>
print("Hello, World!")
</py-script>
</body>
<py-env>
- matplotlib
</py-env>
<div
id=
"matplotlib-lineplot"
>
</div>
<body>
<div
id=
"matplotlib-lineplot"
></div>
<py-script
output=
"matplotlib-lineplot"
>
# Python Code
# importing the matplotlib library
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
# x axis
x = ["Python", "C++", "JavaScript", "Golang"]
# y axis
y = [10, 5, 9, 7]
plt.plot(x, y, marker='o', linestyle='-', color='b')
# Naming the x-label
plt.xlabel('Language')
# Naming the y-label
plt.ylabel('Score')
# Naming the title of the plot
plt.title('Language vs Score')
fig
</py-script>
</body>
\ No newline at end of file
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment