# xyz_canvas
## Interactive canvas for editing 3D geometry, using only matplotlib.pyplot
### What is it?
**XYZ_canvas provides the starting point to create Python code that allows defining and editing objects in 3D space, using only Matplotlib and just over 200 lines of library in canvas.py.**
This library provides you with the 3D co-ordinates of points clicked on and moved to / over, so that you can create your own code to process the points created. You can reach down into the definitions made in canvas.py to manipulate what's created during use, e.g. delete all the points as shown in the customisation example.

### How can I use it?
The "demo_V1.1.0_minimal.py" program shows how simple it is to instantiate the canvas:
```
from xyz_canvas.canvas import xyz_canvas
#instantiating the canvas:
demo = xyz_canvas( xlim =[0,1], ylim =[0,1], zlim=[0,1],
xlabel="x", ylabel="y", zlabel="z"
)
# showing the plot
demo.plt.show()
# note that this is so minimal that all it does is display;
# the resulting points are not used here.
print("Demo finished ...")
```
If you want to do things with the points created, look in "demo_V1.1.0_with_customisation.py". Here you'll see examples of customising the colour scheme and reacting to mouse clicks and mouse moves.
## Installation
Install with pip:
```
pip install xyz_canvas
```
Or simply download the canvas.py and demo.py files, and develop from there.
## Future plans / ideas
- demo how to build on top of this to create objects? (might highlight extra functions needed here)
- add snap to grid (make it settable as dx,dy,dz
- polar / spherical co-ordinates?
- transforms?
Raw data
{
"_id": null,
"home_page": null,
"name": "xyz-canvas",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "3D, Matplotlib, Geometry, GUI, Canvas, Wire frame, minimal, lightweight",
"author": null,
"author_email": "G1OJS <g1ojs@yahoo.com>",
"download_url": "https://files.pythonhosted.org/packages/60/19/567b32947da4de104cab7b07de3dcdb196fc3cc53f920dcf8169679a5e74/xyz_canvas-1.1.2.tar.gz",
"platform": null,
"description": "# xyz_canvas\r\n## Interactive canvas for editing 3D geometry, using only matplotlib.pyplot\r\n\r\n### What is it?\r\n**XYZ_canvas provides the starting point to create Python code that allows defining and editing objects in 3D space, using only Matplotlib and just over 200 lines of library in canvas.py.**\r\n\r\nThis library provides you with the 3D co-ordinates of points clicked on and moved to / over, so that you can create your own code to process the points created. You can reach down into the definitions made in canvas.py to manipulate what's created during use, e.g. delete all the points as shown in the customisation example.\r\n\r\n\r\n\r\n### How can I use it?\r\nThe \"demo_V1.1.0_minimal.py\" program shows how simple it is to instantiate the canvas:\r\n```\r\nfrom xyz_canvas.canvas import xyz_canvas\r\n\r\n#instantiating the canvas:\r\ndemo = xyz_canvas( xlim =[0,1], ylim =[0,1], zlim=[0,1],\r\n xlabel=\"x\", ylabel=\"y\", zlabel=\"z\" \r\n )\r\n\r\n# showing the plot\r\ndemo.plt.show()\r\n\r\n# note that this is so minimal that all it does is display;\r\n# the resulting points are not used here.\r\n\r\nprint(\"Demo finished ...\")\r\n\r\n```\r\nIf you want to do things with the points created, look in \"demo_V1.1.0_with_customisation.py\". Here you'll see examples of customising the colour scheme and reacting to mouse clicks and mouse moves.\r\n\r\n## Installation\r\nInstall with pip:\r\n```\r\npip install xyz_canvas\r\n```\r\nOr simply download the canvas.py and demo.py files, and develop from there.\r\n\r\n## Future plans / ideas\r\n - demo how to build on top of this to create objects? (might highlight extra functions needed here)\r\n - add snap to grid (make it settable as dx,dy,dz\r\n - polar / spherical co-ordinates?\r\n - transforms? \r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Interactive canvas for editing 3D geometry, using matplotlib.pyplot",
"version": "1.1.2",
"project_urls": {
"Homepage": "https://github.com/G1OJS/xyz_canvas",
"Issues": "https://github.com/G1OJS/xyz_canvas/issues"
},
"split_keywords": [
"3d",
" matplotlib",
" geometry",
" gui",
" canvas",
" wire frame",
" minimal",
" lightweight"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "53d8c3df0ccaab8102f20002bd428d20c5d17ff78abf2a4201ef5b841ae879dd",
"md5": "2c2f0e1c70085c9e39d2a51610c18a12",
"sha256": "f9ac594d8875e6921c0b98af53957a19350790b2da9d232091a3170aa41f5aeb"
},
"downloads": -1,
"filename": "xyz_canvas-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2c2f0e1c70085c9e39d2a51610c18a12",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6709,
"upload_time": "2025-07-17T07:48:28",
"upload_time_iso_8601": "2025-07-17T07:48:28.796003Z",
"url": "https://files.pythonhosted.org/packages/53/d8/c3df0ccaab8102f20002bd428d20c5d17ff78abf2a4201ef5b841ae879dd/xyz_canvas-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6019567b32947da4de104cab7b07de3dcdb196fc3cc53f920dcf8169679a5e74",
"md5": "b8b3d672c8eca843c55545ef6a334679",
"sha256": "9a32601ff7dcd6cb2b263f092a8f7186fe5dfcc4b0aca5eba75895830328e2f3"
},
"downloads": -1,
"filename": "xyz_canvas-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "b8b3d672c8eca843c55545ef6a334679",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5840,
"upload_time": "2025-07-17T07:48:29",
"upload_time_iso_8601": "2025-07-17T07:48:29.892350Z",
"url": "https://files.pythonhosted.org/packages/60/19/567b32947da4de104cab7b07de3dcdb196fc3cc53f920dcf8169679a5e74/xyz_canvas-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 07:48:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "G1OJS",
"github_project": "xyz_canvas",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "xyz-canvas"
}