Skip to main content

Add your description here

Project description

econgrapher

A Python package for drawing economic graphs using the turtle library.

Elements

Element (base class)

Abstract base class. All elements inherit from this and implement render(turtle: Turtle).

Label(text, pos, font)

Draws text at a position.

  • text: string to display
  • pos: (x, y) tuple
  • font: ("FontName", size, "style") — default ("Helvetica", 24, "bold")

Line(start, end, style)

Draws a line between two points.

  • start, end: (x, y) tuples
  • style: "solid" or "dashed" (default "solid")

Axes(x_label, y_label, font)

Creates a coordinate system with perpendicular axes.

  • x_label: default "Q"
  • y_label: default "P"

Tags(axes, sub, inter, font)

Marks an intersection point with dashed lines to axes and labels.

  • axes: an Axes instance
  • sub: subscript string (e.g., "1", "e")
  • inter: (x, y) intersection point

Usage

from turtle import Turtle
from econgrapher import Axes, Line, Label, Tags

t = Turtle()

# Draw axes
axes = Axes("Q", "P")
axes.render(t)

# Draw a demand curve
demand = Line((-100, 100), (100, -100))
demand.render(t)

# Mark equilibrium point
tags = Tags(axes, "e", (0, 0))
tags.render(t)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

econgrapher-0.1.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

econgrapher-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file econgrapher-0.1.1.tar.gz.

File metadata

  • Download URL: econgrapher-0.1.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for econgrapher-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cf96972bf77a5889090cd04ef2253a00e78b0f9b156ff10807ac556511b41a23
MD5 75c6d63a83f2c54b4677e582d002cd27
BLAKE2b-256 5e686eba8dfa0beced06103554dee013de0a07a209a725869fb30155c44ed5e3

See more details on using hashes here.

File details

Details for the file econgrapher-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: econgrapher-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for econgrapher-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 649d5c73cebd2770ee00f269a86f0507f38cda66d26a1e7a2ef1bd07c2a4542d
MD5 1893e25a152fb3f57c212906ca8a3c83
BLAKE2b-256 6e97f9ba2fa0e781d2061e93a1d44f18a506c2a06af94084ff655d4f2c32550d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page