Plot Workbench/ro: Difference between revisions

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

{{VeryImportantMessage|The Plot Workbench is unmaintained since v0.17. As of v0.19 it is now designated an [[external_workbenches|external workbench]], so it is no longer included in the base system. If you have experience with the topic and are interested in maintaining it, please see the [https://github.com/FreeCAD/freecad.plot/issues/9 project's repository].}}


[[Image:Workbench_Plot.svg|thumb|128px|Plot workbench icon]]
[[Image:Workbench_Plot.svg|thumb|128px|Plot workbench icon]]
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.
<div class="mw-translate-fuzzy">
{{TOCright}}
Modulul Plot permite utilizatorului să editeze și să salveze graficele create de alte ateliere și instrumente.
</div>


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]].
<div class="mw-translate-fuzzy">

Cu modulul Plot puteți edita zona de lucru, axele, etichetele, titlurile, stilurile etc.
==Module==
</div>

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">
<div class="mw-translate-fuzzy">
==Instrumente==
Modul Plot este o prescurtare din bilbioteca [https://matplotlib.org/ matplotlib] [[Python]]convenabil adaptat la FreeCAD.
</div>
</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:
==Instrumente==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 43: Line 59:




{{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

Plot workbench icon

Introducere

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.

Instrumente

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:

  • Save plot: Salvează desenul/graficul în mai multe formate. Puteți selecta și dimensiunea de ieșire și rezoluția.
  • Axes: Adăugați, eliminați sau editați axele desenelor/graficelor.
  • Series: Editează o serie de titluri și stiluri.
  • Grid: Afișează/ascunde grila.
  • Legend: Afișează /ascunde legenda.
  • Labels: Editează etichetele.
  • Positions: Setează elementele de poziție.

Script-Programare

Deoarece Plot este un strat peste matplotlib, aveți libertatea de a folosi orice funcție din această bibliotecă peste instanțele de plotare. A se vedea scripting examples pentru exemple.

Tutorial