Skip to content

Commit e00552a

Browse files
Merge pull request #215 from Speedrunyourknowledge/develop
Fix Home Page Shifting and Add Grid Lines to Integral Graphs
2 parents 5da22d3 + 2ae4334 commit e00552a

File tree

14 files changed

+20634
-20613
lines changed

14 files changed

+20634
-20613
lines changed

calc-backend/graph-gen/graph-integral.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,14 @@ def generate_bars(n_bars):
135135
barmode='overlay',
136136
xaxis_title="x-axis",
137137
yaxis_title="y-axis",
138-
xaxis=dict(range=[a, b], fixedrange=True),
138+
xaxis=dict(range=[a, b], fixedrange=True, showgrid=True),
139139
yaxis=dict(fixedrange=True),
140140
)
141141

142142
fig_json = fig.to_json(pretty=True)
143143

144144
print(fig_json)
145145

146+
# Uncomment to save the graph as HTML code to use in the frontend
147+
# fig.write_html("graph.html", include_plotlyjs=False, full_html=False, div_id='integral-graph')
148+

calc-backend/graph-gen/graph-limits.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import numpy as np
33

44
# === USER DEFINES ONLY THESE TWO ===
5-
func = lambda x: x**3 # ← your function
6-
limit_x = 0 # ← point to approach
5+
func = lambda x: np.log(x) # ← your function
6+
limit_x = 2 # ← point to approach
77

88
# === Slider & sampling settings (fixed) ===
99
num_steps = 50
@@ -90,3 +90,9 @@ def segment(i):
9090
)
9191

9292
fig.show()
93+
94+
fig_json = fig.to_json(pretty=True)
95+
96+
# Save to file
97+
with open("limit-graph.txt", "a") as f:
98+
f.write(fig_json)

calc-frontend/public/lnLim.json

Lines changed: 15309 additions & 15315 deletions
Large diffs are not rendered by default.

calc-frontend/src/components/Cosine/IntCosineGraph.tsx

Lines changed: 660 additions & 656 deletions
Large diffs are not rendered by default.

calc-frontend/src/components/Cubic/IntCubicGraph.tsx

Lines changed: 670 additions & 667 deletions
Large diffs are not rendered by default.

calc-frontend/src/components/Euler/IntEulerGraph.tsx

Lines changed: 658 additions & 656 deletions
Large diffs are not rendered by default.

calc-frontend/src/components/Line/IntLineGraph.tsx

Lines changed: 658 additions & 655 deletions
Large diffs are not rendered by default.

calc-frontend/src/components/NatLog/IntNatLogGraph.tsx

Lines changed: 659 additions & 656 deletions
Large diffs are not rendered by default.

calc-frontend/src/components/NatLog/NatLogLim.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function NatLogLim() {
2222
<div>
2323
<div className="flex">
2424
<div ref={container} className="center-header">
25-
\lim_&#123;x\to1&#125;\ln(x)
25+
\lim_&#123;x\to2&#125;\ln(x)
2626
</div>
2727
</div>
2828

calc-frontend/src/components/Quadratic/IntQuadraticGraph.tsx

Lines changed: 669 additions & 666 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)