Skip to content

Instantly share code, notes, and snippets.

@CodeDrome
Created September 13, 2022 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeDrome/bdbfff5823bcbbc549a4b806e977f2cf to your computer and use it in GitHub Desktop.
Save CodeDrome/bdbfff5823bcbbc549a4b806e977f2cf to your computer and use it in GitHub Desktop.
functionplotterdemo.py
import functionplotter as fp
import samplefunctions as sf
def main():
print("--------------------")
print("| codedrome.com |")
print("| Function Plotter |")
print("--------------------\n")
plot_samples()
def plot_samples():
fp.plot(functions = [sf.samples["quadratic"]],
start = -2,
end = 2,
step = 0.05,
config = {"legend_labels": ["quadratic"],
"title": "Quadratic",
"xlabel": "x",
"ylabel": "y",
"linewidth": 0.5,
"colors": [ "#0000FF" ],
"x_limit": (-2.5, 2.5),
"y_limit": (-1, 5)
})
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment