matplotlib / matplotlib/matplotlib
Copy to Clipboard not Enabled by Default
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 23.2k
- Forks
- 8.5k
- Merge médio
- 1d 6h
- PRs com merge (30d)
- 66
Descrição
### Bug report
**Bug summary**
Copy Canvas tool seems to have been implemented in v3.0 as in #10446 but is not enabled in Matplotlib 3.0.2 by default. Copy/paste functionality can be restored using `plt.rcParams['toolbar'] = 'toolmanager'` but creates warnings as in #7404
**Code for reproduction**
```python
# Paste your code here
# plt.rcParams['toolbar'] = 'toolmanager' #restores copy to clipboard functionality by replacing toolbar2 with toolmanager
x = np.linsapce(1,10); y = np.linspace(1,10)
fig, ax = plt.subplots()
ax.plot(x, y)
plt.show()
```
**Actual outcome**
Default behavior (no copy/paste functionality, toolbar2)

Setting toolbar to toolmanager (copy/paste functionality, toolmanager). Console warning output shown below when activated

```
# If applicable, paste the console output here
C:\Users\Alex\Miniconda3\envs\vanilla\lib\site-packages\matplotlib\backend_managers.py:58: UserWarning: Treat the new Tool classes introduced in v1.5 as experimental for now, the API will likely change in version 2.1 and perhaps the rcParam as well
'experimental for now, the API will likely change in ' +
C:\Users\Alex\Miniconda3\envs\vanilla\lib\site-packages\matplotlib\backend_tools.py:79: UserWarning: Treat the new Tool classes introduced in v1.5 as experimental for now, the API will likely change in version 2.1, and some tools might change name
'experimental for now, the API will likely change in ' +
```
**Expected outcome**
Pressing ctrl+c or cmd+c should copy figure to clipboard as in #10446 and rcParams documentation by default. It seems that it must be explicitly turned on at the moment
**Matplotlib version**
* Operating system: Windows 10
* Matplotlib version: 3.0.2, installed via conda (default channel)
* Matplotlib backend (`print(matplotlib.get_backend())`): Qt5Agg
* Python version: 3.7.1
* Jupyter version (if applicable): N/A
* Other libraries:
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduce the issue with Matplotlib 3.0.2 using the Qt5Agg backend, comparing the default toolbar with rcParams['toolbar'] set to 'toolmanager'. Start at the toolbar, toolmanager, and copy-to-clipboard entry points mentioned in the report. Done means Ctrl+C or Cmd+C copies the figure by default without the reported experimental-tool warnings.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- data-visualization, desktop
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100