{"id":43351801,"url":"https://github.com/bedbad/justpyplot","last_synced_at":"2026-02-02T02:30:30.562Z","repository":{"id":218266872,"uuid":"746004621","full_name":"bedbad/justpyplot","owner":"bedbad","description":"Plot in NumPy arrays directly, overlay NumPy plots straight over video real-time, plot in Jupyter without a single loop","archived":false,"fork":false,"pushed_at":"2025-09-02T23:24:57.000Z","size":31925,"stargazers_count":146,"open_issues_count":3,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-03T01:14:58.360Z","etag":null,"topics":["matplotlib-figures","matplotlib-python","plot","plot-in-numpy","plotting","plotting-directly-numpy","plotting-in-numpy","plotting-in-python","vectorized","vectorized-computation","vectorized-solutions"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bedbad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/funding.yaml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"bedbad","buy_me_a_coffee":"bedbad"}},"created_at":"2024-01-20T19:51:29.000Z","updated_at":"2025-09-02T23:25:01.000Z","dependencies_parsed_at":"2025-02-26T02:21:24.260Z","dependency_job_id":"64bc3bbb-6c18-47a4-902a-28d053a14877","html_url":"https://github.com/bedbad/justpyplot","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.4193548387096774,"last_synced_commit":"fc074f9f7fbc390287d9ac9402bcc84231af14ae"},"previous_names":["bedbad/justpyplot"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bedbad/justpyplot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedbad%2Fjustpyplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedbad%2Fjustpyplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedbad%2Fjustpyplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedbad%2Fjustpyplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bedbad","download_url":"https://codeload.github.com/bedbad/justpyplot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedbad%2Fjustpyplot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29001654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"online","status_checked_at":"2026-02-02T02:00:07.448Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matplotlib-figures","matplotlib-python","plot","plot-in-numpy","plotting","plotting-directly-numpy","plotting-in-numpy","plotting-in-python","vectorized","vectorized-computation","vectorized-solutions"],"created_at":"2026-02-02T02:30:29.757Z","updated_at":"2026-02-02T02:30:30.543Z","avatar_url":"https://github.com/bedbad.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003eWhy not just get your plots in numpy?! \u003c/h1\u003e\nWhy not just have a simple API\n\n__plot__(__values__, __grid_options__, __figure_options__, ...) -\u003e\n(__figures__, __grid__, __axis__,__labels__)\n\nwhich renders plot in numpy/tensors and you can overlay, mask, transform, publish in any way you want whilst fully controlling every detail of your plot and figures?\n\n## Installation\n```bash\npip install justpyplot\n```\n\u003ch1 align=\"center\"\u003eJustPyPlot: Fast NumPy-Native Plotting\u003c/h1\u003e\n\n\n## So Why Yes?\n- **Fast**: Vectorized plotting directly to NumPy arrays - no memory screenshots or buffer copies\nA high-performance plotting library that renders directly to NumPy arrays. Measured 20-100x faster than matplotlib:\n```bash\ntimer \"full justpyplot + rendering\": avg 382 µs ± 135 µs, max 962 µs\n```\n- **Simple**: Get all plots parts as arrays with a single function call \n```python\nfigure, grid, axis, labels = jplt.plot(values,grid_opts,figure_opts,title,(600, 400))\n```\nand put them on, in or into everwhere you need in 1-2 subsequent lines\n\n- **Flexible**: Control every plot element (figures, grid, axis, labels) and every detail of plotting options independently, all design options are parsed from json-style figure and grid option dicts with full documentation available: https://justpyplot.readthedocs.io/en/latest/\n\n- **No dependencies**: Just vectorized python with numpy(+ other tensor lib you need), which makes standalone and compatible with any use case\n\n- **Small** Less then 20K total and 1000 total of core code which you can all understand\n\n\n- **Real-time**: Was initially scrapped for computer vision and robotics for real-time visualization and physical debugging tasks where standard plotting failed\n\n- **ML/AI Pluggable**: You can, for example stick it onto visual layers of neural network for it to learn your plotted characteristic without changing any dimensions. \n\n## BASIC USAGE\n\n![Basic Usage](resources/sinus.gif)\n\nYou can explore the documentation for the plot function which supports any flexing or adjusting of the plot as you need such as colors, scatter, connected with line thickness, labels, etc.\n\n```python\nimport numpy as np \nimport cv2\nimport time\nfrom justpyplot import justpyplot as jplt\n\nt0 = time.perf_counter()\nxs, ys = [], []\n\nwhile(cv2.waitKey(1) != 27):  # Press ESC to exit\n    xt = time.perf_counter() - t0\n    yx = np.sin(xt)\n    xs.append(xt)\n    ys.append(yx)\n    \n    # Create plot data array\n    plot_data = np.array([xs, ys])\n    \n    # Generate plot arrays with customized options\n    figure, grid, labels, title_img = jplt.plot(\n        plot_data,\n        grid={'nticks': 5, 'color': (128, 128, 128, 255)},\n        figure={'scatter': True, 'line_color': (255, 0, 0, 255), 'line_width': 2},\n        title=\"sin() from Clock\",\n        size=(600, 400)\n    )\n    \n    # Blend all plot layers into single image\n    plotted_array = jplt.blend(figure, grid, labels, title_img)\n  \n    \n    cv2.imshow('np array plot', plotted_array)\n```\n\n\n### Overlaying Multiple Plots\n\n You take to take your plot which you can mask, stretch, transform and render wherever in frame array/canvas/memory you need and just overlay it simpler in one line?\n\nHere 1-liner function implementing those basic steps stuck on running mug neural network.\nIn 3 lines of code it shows how to mess and visually debug 3d position of computer vision/robotics object in physical world (try in examples/mug_objectron/demo.py):\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"resources/demo.gif\" alt=\"Overlaying multiple plots\"\u003e\n\u003c/p\u003e\n\n```python\njplt.plot1_at(image, ang_zs,\n            title='Angle from Z axis', offset=(50,50), size=(270, 300),\n            point_color=(255,0,0),line_color=(255,0,0), label_color=(255,0,0), grid_color=(126,126,126))\njplt.plot1_at(image, ang_ys,\n          title='Angle from Y axis', offset=(400,50), size=(270, 300),\n          point_color=(0,255,0), line_color=(0,255,0),label_color=(0,255,0), grid_color=(126,126,126),\n          scatter=False)\njplt.plot1_at(image,ang_xs,\n          title='Angle from X axis', offset=(750,50), size=(270, 300),\n          point_color=(0,0,255), line_color=(0,0,255),label_color=(0,0,255), grid_color=(126,126,126),\n          scatter=False)\n```\n\n### Jupyter Notebook Usage\n\nFor jupyter support you can render images out how you like. One of the simplest is to use the blend2PIL function depening on Pillow package which will blend all the plot layers into a single PIL image buffer which you display in notebook\n\n```python\nimport numpy as np\nfrom IPython.display import Image as ipyImage, display\nfrom justpyplot import justpyplot as jplt\n\n# Make some dependency data\nx = np.linspace(0, 10, 50)\ny = np.sin(x)\n\n# Just plot in numpy using the plot() function\nfigure_img, grid_img, labels_img, title_img = jplt.plot(\n    np.array([x, y]),\n    grid={'nticks': 10, 'color': (128, 128, 128, 255), 'label_color': (255, 0, 0, 255),'precision': 1, 'label_font_size': 0.9},\n    figure={'scatter':False,'point_color': (255, 0, 0, 255), 'point_radius':3, 'line_color':(0,64,64, 255), 'line_width': 2, 'marker_style':'circle'},\n    title='Sine Wave',\n    size=(300, 400),\n    max_len=100\n)\n\n# blend arrays into PIL picture buffer (requires Pillow)\nbuffer = jplt.blend2PIL(grid_img, figure_img, labels_img, title_img, format='PNG')\n\n# Display the image\ndisplay(ipyImage(buffer.getvalue()))\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"resources/jupyter_pil.png\" alt=\"Jupyter Plot Output\"\u003e\n\u003c/p\u003e\n\n### Documentation\n\nDocumentation is fully available at https://justpyplot.readthedocs.io/en/latest/\n\n\n\n\n","funding_links":["https://github.com/sponsors/bedbad","https://buymeacoffee.com/bedbad"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedbad%2Fjustpyplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbedbad%2Fjustpyplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedbad%2Fjustpyplot/lists"}