Plot Workbench/it: Difference between revisions

From FreeCAD Documentation
(Created page with "===Script=== Poiché il modulo Grafico è costruito su matplotlib, si è liberi di utilizzare tutti i comandi matplotlib per le istanze del grafico. Consultare la sezione [[...")
(Updating to match new version of source page)
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
Il modulo Plot (Grafico) permette di editare e di salvare i grafici sviluppati da altri moduli e strumenti.


[[Image:Workbench_Plot.svg|thumb|128px|L'icona dell'ambiente Plot]]
Con il modulo Plot è possibile modificare facilmente l'area di lavoro, gli assi, le etichette, i titoli, gli stili, ecc..


{{TOCright}}
Il modulo è un derivato di [http://matplotlib.org matplotlib] convenientemente adattato a FreeCAD.

==Introduzione==

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.

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]].

==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:
Il modulo Grafico offre i seguenti strumenti.



* [[Image:Plot_Save.png]] [[Plot_Save/it|Salva grafico]]: Consente di salvare il grafico in diversi formati. È possibile selezionare il formato di output e anche la risoluzione.
* [[Image:Plot_Save.svg|32px]] [[Plot_Save/it|Salva grafico]]: consente di salvare il grafico in diversi formati. È possibile selezionare il formato di output e anche la risoluzione.
* [[Image:Plot_Axes.png]] [[Plot_Axes/it|Assi]]: Aggiunge, rimuove o modifica gli assi del grafico.
* [[Image:Plot_Series.png]] [[Plot_Series/it|Serie]]: Modifica il titolo e lo stile della serie.
* [[Image:Plot_Axes.svg|32px]] [[Plot_Axes/it|Assi]]: aggiunge, rimuove o modifica gli assi del grafico.
* [[Image:Plot_Grid.png]] [[Plot_Grid/it|Griglia]]: Mostra o nasconde la griglia.
* [[Image:Plot_Series.svg|32px]] [[Plot_Series/it|Serie]]: modifica il titolo e lo stile della serie.
* [[Image:Plot_Legend.png]] [[Plot_Legend/it|Legenda]]: Mostra o nasconde la legenda.
* [[Image:Plot_Grid.svg|32px]] [[Plot_Grid/it|Griglia]]: mostra o nasconde la griglia.
* [[Image:Plot_Labels.png]] [[Plot_Labels/it|Etichette]]: Edita le etichette.
* [[Image:Plot_Legend.svg|32px]] [[Plot_Legend/it|Legenda]]: mostra o nasconde la legenda.
* [[Image:Plot_Positions.png]] [[Plot_Positions/it|Posizioni]]: Posiziona i vari elementi, come le etichette o la legenda.
* [[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.

==Scripting==


===Script===
===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_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==
* [[Plot Basic tutorial]]
* [[Plot MultiAxes tutorial]]


===Tutorial===
{{Docnav| | }}


* [[Plot Basic tutorial/it|Guida di base per il modulo Grafico]] di FreeCAD
[[Category:User Documentation]]
* [[Plot MultiAxes tutorial/it|Guida ai grafici MultiAsse]]



{{clear}}
{{Plot_Tools_navi{{#translation:}}}}
<languages/>
{{Userdocnavi{{#translation:}}}}
[[Category:External_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