Plot Workbench/fr: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>

{{VeryImportantMessage|L'Atelier Plot n'est plus maintenu depuis la v0.17. Depuis la v0.19, il est désormais désigné comme un [[external_workbenches/fr|atelier externe]], il n'est donc plus inclus dans le système de base. Si vous avez de l'expérience avec le sujet et êtes intéressé à le maintenir, veuillez consulter le [https://github.com/FreeCAD/freecad.plot/issues/9 dépôt du projet].}}


[[Image:Workbench_Plot.svg|thumb|128px|Icône de l'atelier Plot]]
[[Image:Workbench_Plot.svg|thumb|128px|Icône de l'atelier Plot]]
Line 8: Line 6:
{{TOCright}}
{{TOCright}}


FreeCAD is able to perform plots using the [https://matplotlib.org/ matplotlib] [[Python|Python]] library. A module is provided to this end, as an external add-on in version 0.19 and as a core component from version 0.20 on. Older versions of FreeCAD are not covered in this documentation.
L'[[Image:Workbench_Plot.svg|24px]] [[Plot Workbench/fr|atelier Plot]] permet à l'utilisateur de modifier et de sauvegarder les tracés de sortie créés à partir d'autres ateliers et outils.


The produced plots offer the standard [https://matplotlib.org/ matplotlib] tools to edit and save. On top of that, a [[Image:Workbench_Plot.svg|24px]] [[Plot Workbench|Plot Workbench]] is provided as an external add-on offering more complete tools to edit the plot and save it. The add-on can be installed with the [[Std_AddonMgr|Add-on manager]].
Avec le module '''Plot''' , vous pouvez facilement modifier '''la zone de travail, les axes, étiquettes, titres, style de lignes, etc ..'''.


==Module==
L'atelier Plot est une abstraction à la bibliothèque [https://matplotlib.org/ matplotlib] [[Python/fr|Python]] adaptée à FreeCAD. Pour utiliser les fonctions de tracé, la version de {{incode|matplotlib}} installée sur votre système doit correspondre à la version de Python utilisée par FreeCAD. En d'autres termes, si FreeCAD utilise Python 2.7, vous devez disposer de {{incode|matplotlib}}. même version.


The module can be invoked in a Python console or in a [[Macro|macro]]. The first thing you must do is importing the module.
In FreeCAD 0.19 you must first install the [[Image:Workbench_Plot.svg|24px]] [[Plot Workbench|Plot Workbench]] using the [[Std_AddonMgr|Add-on manager]], and then you can import Plot typing

{{Code|code=
from freecad.plot import Plot
}}

From FreeCAD 0.20 on plot module is already packaged within the program, so you don't need to install any add-on, but just type

{{Code|code=
from FreeCAD.Plot import Plot
}}

After that, you can plot a straight line from (0,0) to (1,2) just simply typing

{{Code|code=
Plot.plot([0, 1], [0, 2])
}}

You can find more complex examples in the [[Plot Basic tutorial]] and the [[Plot MultiAxes tutorial]].

<div class="mw-translate-fuzzy">
==Outils==
==Outils==
</div>

If you decide to install the [[Image:Workbench_Plot.svg|24px]] [[Plot Workbench|Plot Workbench]] using the [[Std_AddonMgr|Add-on manager]], you will have the following tools available to manage the plots created with the module:


* [[Image:Plot_Save.svg|32px]] [[Plot_Save/fr|Suavegarde]]: Enregistrer sous plusieurs formats. Vous pouvez sélectionner la taille de sortie et la résolution.
* [[Image:Plot_Save.svg|32px]] [[Plot_Save/fr|Suavegarde]]: Enregistrer sous plusieurs formats. Vous pouvez sélectionner la taille de sortie et la résolution.
Line 35: Line 58:




{{Plot Tools navi{{#translation:}}}}
{{Plot_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
[[Category:External Workbenches{{#translation:}}]]
[[Category:External_Workbenches{{#translation:}}]]
[[Category:Addons{{#translation:}}]]
[[Category:Addons{{#translation:}}]]

Revision as of 02:17, 31 August 2021

Icône de l'atelier Plot

Introduction

FreeCAD is able to perform plots using the matplotlib Python library. A module is provided to this end, as an external add-on in version 0.19 and as a core component from version 0.20 on. Older versions of FreeCAD are not covered in this documentation.

The produced plots offer the standard matplotlib tools to edit and save. On top of that, a Plot Workbench is provided as an external add-on offering more complete tools to edit the plot and save it. The add-on can be installed with the Add-on manager.

Module

The module can be invoked in a Python console or in a macro. The first thing you must do is importing the module. In FreeCAD 0.19 you must first install the Plot Workbench using the Add-on manager, and then you can import Plot typing

from freecad.plot import Plot

From FreeCAD 0.20 on plot module is already packaged within the program, so you don't need to install any add-on, but just type

from FreeCAD.Plot import Plot

After that, you can plot a straight line from (0,0) to (1,2) just simply typing

Plot.plot([0, 1], [0, 2])

You can find more complex examples in the Plot Basic tutorial and the Plot MultiAxes tutorial.

Outils

If you decide to install the Plot Workbench using the Add-on manager, you will have the following tools available to manage the plots created with the module:

  • Suavegarde: Enregistrer sous plusieurs formats. Vous pouvez sélectionner la taille de sortie et la résolution.
  • Axes: Ajouter, effacer ou editer les axes Plot.
  • Séries: Editer les séries titres et style.
  • Grille: Afficher/Cacher la grille.
  • Légende: Afficher/Cacher les légendes.
  • Etiquettes: Éditer les étiquettes.
  • Positions: Ensemble des éléments de positions.

Script

Puisque l'atelier Plot est une couche sur matplotlib, vous êtes libre d'utiliser toutes les commandes de la librairie matplotlib. Voir exemples de scripts pour des exemples.

Tutoriels

Tutoriel de base

Tutoriel multi Axes