Like matplotlib but renders in a local server so you can work remotely
Project description
Remote Plot
Developing python code on a remote machine can get frustrating when you want to visualize your results. Instead of relying on a remote screen / X11 forwarding / VNC, Remote Plot opens your plots in a local server. It's a super simple library that replicates the API of matplotlib with a web renderer. All you need to do is forward the port to your machine. If your using VS Code, it will take of it for you.
Getting started
Installation
pip install remote_plot
Port forwarding
If you are using VSCode, once you run your first plot, it will automatically forward the port and pop a dialog box that will let you open the plot in your web browser.
If you are using SSH, you can forward the port using he following flag while connecting to the remote machine:
ssh YOUR_USER_NAME@YOUR_MACHINE_IP -L 8000:localhost:8000
Then, you can just open localhost:8000 in a web browser once you run your first plot.
Your first plot
from remote_plot import plt
plt.plot([1, 2, 3], [4, 5, 6])
API
Remote plot replicates the matplotlib API, which you can find here.
It also supports native image displaying that can display numpy array or pillow images.
from PIL import Image
img = Image.open("PATH TO YOUR IMAGE")
plt.imshow_native(img)
Changing the web server port
from remote_plot import plt
plt.port = 8001
License
MIT License. See LICENSE for further details.
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
Built Distribution
Hashes for remote_plot-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b438d191055d065a172aa9e7657b16a59112fe40f61fcf24b4ed77e3baa9187 |
|
MD5 | aa0395c731a4fd481573fe2eca5837f0 |
|
BLAKE2b-256 | 8fba1c5def87bf2c2f11af8d521002083ee8e0396bd67c2f48d2f380101f54de |