Skip to content

Commit

Permalink
notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Apr 14, 2024
1 parent 55c5120 commit 3acbad7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
format: jb-book
root: index
chapters:
- file: plots
- file: pyplot
- file: pythonplot
- file: sub/plots
- file: sub/plots-lit
16 changes: 9 additions & 7 deletions docs/plots.ipynb → docs/pyplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"id": "6a2385e8-96d9-4683-ade2-3cf50cb3ac6a",
"metadata": {},
"source": [
"# Plotting with PythonPlot.jl"
"# Plotting with PythonPlot.jl\n",
"\n",
"With Jupyter notebook."
]
},
{
Expand All @@ -25,7 +27,7 @@
"source": [
"import PythonPlot as plt\n",
"using Random\n",
"Random.seed!(2022)\n"
"Random.seed!(2022)"
]
},
{
Expand All @@ -35,7 +37,7 @@
"metadata": {},
"outputs": [],
"source": [
"plt.plot(1:5, rand(1:6, 5))\n"
"plt.plot(1:5, rand(1:6, 5))"
]
},
{
Expand All @@ -45,7 +47,7 @@
"metadata": {},
"outputs": [],
"source": [
"versioninfo()\n"
"versioninfo()"
]
},
{
Expand All @@ -56,21 +58,21 @@
"outputs": [],
"source": [
"import Pkg\n",
"Pkg.status()\n"
"Pkg.status()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.10.0",
"display_name": "Julia 1.10.2",
"language": "julia",
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.0"
"version": "1.10.2"
}
},
"nbformat": 4,
Expand Down
6 changes: 2 additions & 4 deletions docs/pythonplot.jl
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
#===
# Plotting with PythonPlot.jl
===#
Using Literate.jl
===#
import PythonPlot as plt
using Random
Random.seed!(2022)

#---

plt.figure()
plt.plot(1:5, rand(1:6, 5))
plt.gcf()

# ## Runtime information

import Pkg
Pkg.status()

#---

import InteractiveUtils
InteractiveUtils.versioninfo()
5 changes: 1 addition & 4 deletions docs/sub/plots-lit.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
#===
# Plotting by Plots.jl
Using Literate.jl
===#

using Plots
using Random
Random.seed!(2022)

#---

plot(rand(1:6, 5))

# ## Runtime information

import Pkg
Pkg.status()

#---

import InteractiveUtils
InteractiveUtils.versioninfo()
17 changes: 10 additions & 7 deletions docs/sub/plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"id": "6a2385e8-96d9-4683-ade2-3cf50cb3ac6a",
"metadata": {},
"source": [
"# Plotting with Plots.jl"
"# Plotting with Plots.jl\n",
"\n",
"With Jupyter notebook."
]
},
{
Expand All @@ -25,7 +27,8 @@
"source": [
"using Plots\n",
"using Random\n",
"Random.seed!(2022)\n"
"Plots.default(fmt=:png)\n",
"Random.seed!(2024)"
]
},
{
Expand All @@ -35,7 +38,7 @@
"metadata": {},
"outputs": [],
"source": [
"plot(1:5, rand(1:6, 5))\n"
"plot(1:5, rand(1:6, 5))"
]
},
{
Expand All @@ -45,7 +48,7 @@
"metadata": {},
"outputs": [],
"source": [
"versioninfo()\n"
"versioninfo()"
]
},
{
Expand All @@ -56,21 +59,21 @@
"outputs": [],
"source": [
"import Pkg\n",
"Pkg.status()\n"
"Pkg.status()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.10.0",
"display_name": "Julia 1.10.2",
"language": "julia",
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.0"
"version": "1.10.2"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 3acbad7

Please sign in to comment.