matplotlib / matplotlib/ipympl

(Auto-)Resize plots that start too large

Đang mở
#431 7 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Jupyter Notebook
Star
1.7k
Fork
234
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Describe the issue
Plots by default are sometimes too large, and the right side is cut off (e.g. when using the sexy Jupyter Lab side-by-side rendering or just using a small screen. Obviously you then want to resize them. However, since the resize handle is at the bottom right, it is also not visible. So the only current solution is to manually change the figure size in the code and re-run until it is visible. Not an ideal solution; sometimes you may not have direct access to the code creating the figure.

Some possible solutions:
- add a horizontal scrollbar (probably would need to be done on the JupyterLab side)
- introduce an auto-resize feature in the ipympl figure toolbar that will automatically resize the figure to the available width when pressed
- auto resize all newly created figures, maybe activatable by an "%ipympl autoresize" magic method
- make the handle location configurable
- scale the entire figure such that all of it is always visible (probably doesn't work too well with manual resizing), just like for inline plots

The current state is rather frustrating.

Example:
![image](https://user-images.githubusercontent.com/847751/154273498-efef7d99-0c0c-4cd7-adb6-2f63586be94c.png)

## Versions

jupyterlab==3.2.8
jupyterlab-widgets==1.0.2
ipympl==0.8.7
ipywidgets==7.6.5

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng việc xem xét thanh công cụ figure của ipympl và cách JupyterLab hiển thị các figure cạnh nhau. So sánh các cách tiếp cận được đề xuất để làm cho một plot quá lớn có thể sử dụng được, sau đó xác định hành vi resize dự kiến và kiểm tra hành vi đó trong các phiên bản JupyterLab, ipywidgets và ipympl được liệt kê; issue không nêu tên file hoặc test nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
jupyter, jupyter-notebook
Lĩnh vực
data-visualization, frontend
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.