Plot Workbench/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{Docnav/it|[[Path Workbench/it|Ambiente Path]]|[[Points Workbench/it|Ambiente Points]]|IconL=Workbench_Path.svg|IconR=Workbench_Points.svg}}

{{VeryImportantMessage|L'ambiente Plot non è più mantenuto dalla v0.17. A partire dalla v0.19 ora è designato come [[external_workbenches/it|ambiente esterno]], quindi non è più incluso nel sistema di base. Se avete esperienza con l'argomento e siete interessati a mantenerlo, consultate il [https://github.com/FreeCAD/freecad.plot/issues/9 project's repository].}}


[[Image:Workbench_Plot.svg|thumb|128px|L'icona dell'ambiente Plot]]
[[Image:Workbench_Plot.svg|thumb|128px|L'icona dell'ambiente Plot]]


==Introduzione==
{{TOCright}}
{{TOCright}}


==Introduzione==
Il modulo[[Image:Workbench_Plot.svg|24px]] Plot (Grafico) permette di editare e di salvare i grafici sviluppati da altri ambienti e strumenti.


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.
Con il modulo Plot è possibile modificare facilmente l'area di lavoro, gli assi, le etichette, i titoli, gli stili, ecc..


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]].
L'ambiente Plot è un'astrazione della libreria [https://matplotlib.org/ matplotlib] [[Python/it|Python]] opportunamente adattata per FreeCAD. Per usare le funzioni di Plot, la versione di {{incode|matplotlib}} installata nel proprio sistema deve corrispondere alla versione di Python usata da FreeCAD, cioè, se FreeCAD usa Python 2.7, si deve avere {{incode|matplotlib}} per stessa versione.

==Module==

The module can be invoked in a Python console or in a [[Macros|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 by typing:

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

Since FreeCAD 0.20 the plot module is already packaged with 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|Plot Basic tutorial]] and the [[Plot_MultiAxes_tutorial|Plot MultiAxes tutorial]].


=== Strumenti ===
=== Strumenti ===

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:




Line 25: Line 45:
* [[Image:Plot_Labels.svg|32px]] [[Plot_Labels/it|Etichette]]: edita le etichette.
* [[Image:Plot_Labels.svg|32px]] [[Plot_Labels/it|Etichette]]: edita le etichette.
* [[Image:Plot_Positions.svg|32px]] [[Plot_Positions/it|Posizioni]]: posiziona i vari elementi, come le etichette o la legenda.
* [[Image:Plot_Positions.svg|32px]] [[Plot_Positions/it|Posizioni]]: posiziona i vari elementi, come le etichette o la legenda.

==Scripting==


===Script===
===Script===


Poiché il modulo Grafico è costruito su {{incode|matplotlib}}, si è liberi di utilizzare tutti i comandi matplotlib per le istanze del grafico. Consultare la sezione [[Scripting_examples/it|esempi di script]] per vedere degli esempi.
Poiché il modulo Grafico è costruito su {{incode|matplotlib}}, si è liberi di utilizzare tutti i comandi matplotlib per le istanze del grafico. Consultare la sezione [[Scripting_and_macros|Scripting and macros]] per vedere degli esempi.

==Tutorial==


===Tutorial===
===Tutorial===
Line 35: Line 59:
* [[Plot MultiAxes tutorial/it|Guida ai grafici MultiAsse]]
* [[Plot MultiAxes tutorial/it|Guida ai grafici MultiAsse]]


{{Docnav/it|[[Path Workbench/it|Ambiente Path]]|[[Points Workbench/it|Ambiente Points]]|IconL=Workbench_Path.svg|IconR=Workbench_Points.svg}}



{{Plot Tools navi{{#translation:}}}}


{{Plot_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
[[Category:External_Workbenches{{#translation:}}]]

[[Category:Workbenches{{#translation:}}]]
[[Category:Addons{{#translation:}}]]

Latest revision as of 16:49, 25 June 2022

L'icona dell'ambiente Plot

Introduzione

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 by typing:

from freecad.plot import Plot

Since FreeCAD 0.20 the plot module is already packaged with 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.

Strumenti

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:


  • Salva grafico: consente di salvare il grafico in diversi formati. È possibile selezionare il formato di output e anche la risoluzione.
  • Assi: aggiunge, rimuove o modifica gli assi del grafico.
  • Serie: modifica il titolo e lo stile della serie.
  • Griglia: mostra o nasconde la griglia.
  • Legenda: mostra o nasconde la legenda.
  • Etichette: edita le etichette.
  • Posizioni: posiziona i vari elementi, come le etichette o la legenda.

Scripting

Script

Poiché il modulo Grafico è costruito su matplotlib, si è liberi di utilizzare tutti i comandi matplotlib per le istanze del grafico. Consultare la sezione Scripting and macros per vedere degli esempi.

Tutorial

Tutorial