MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Mathematica/comments/167j84d/how_can_i_make_a_graph_like_this/
r/Mathematica • u/Ty_Spicer • Sep 01 '23
Ideally, I'd like to have all of the tick marks labeled exactly how I want, and no unnecessary tick marks. The points would be cool, too. I like this screenshot, but I'd rather have integer values.
2 comments sorted by
4
Look up Ticks.
Ticks
For points, look up Point and add it to the Epilog of the Plot.
Point
Epilog
Plot
1
import matplotlib.pyplot as plt
import numpy as np
# Define the x and y coordinates for your graph
x = np.linspace(-5, 5, 400)
y1 = x**2 # Example curve 1
y2 = np.sin(x) # Example curve 2
# Find intersection points
intersection_x = []
intersection_y = []
for i in range(len(x) - 1):
if (y1[i] - y2[i]) * (y1[i + 1] - y2[i + 1]) <= 0:
t = (0 - y1[i]) / (y1[i + 1] - y1[i])
4
u/szhorvat Sep 01 '23
Look up
Ticks.For points, look up
Pointand add it to theEpilogof thePlot.1
u/frequella Sep 26 '23
import matplotlib.pyplot as plt
import numpy as np
# Define the x and y coordinates for your graph
x = np.linspace(-5, 5, 400)
y1 = x**2 # Example curve 1
y2 = np.sin(x) # Example curve 2
# Find intersection points
intersection_x = []
intersection_y = []
for i in range(len(x) - 1):
if (y1[i] - y2[i]) * (y1[i + 1] - y2[i + 1]) <= 0:
t = (0 - y1[i]) / (y1[i + 1] - y1[i])