User Tools

Site Tools


nnm:visualization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
nnm:visualization [2019/03/07 12:33]
stefan.birner [Overlay feature]
nnm:visualization [2020/10/23 09:43]
nextnanowikiadmin removed
Line 1: Line 1:
-====== Output ​format ​======+====== ​Tab: Output ====== 
 + 
 +===== Output format ​=====
  
 nextnanomat can display the following output formats. nextnanomat can display the following output formats.
Line 23: Line 25:
 </​code>​ </​code>​
  
-  * ''​.fld''​ - 1D/2D/3D [[http://​www.nextnano.com/​nextnano3/​input_parser/​keywords/​output-file-format.htm|AVS data format]] (rectilinear grid)  -  scalar field $f(x,y,z)$ or vector field $\mathbf{F}(x,​y,​z)$.+  * ''​.vtr''​ - 2D/3D [[http://​www.nextnano.com/​nextnano3/​input_parser/​keywords/​output-file-format.htm|VTK data format]] (rectilinear grid)  -  scalar field $f(x,y,z)$ or vector field $\mathbf{F}(x,​y,​z)$. ''​.vtr''​ files can be viewed using the [[nnm:​visualization#​d_visualizationparaview|Paraview]] software which is a full 3D visualization software while nextnanomat only displays 2D slices of 3D data files.
  
-  * ''​.vtr''​ - 2D/3D [[http://​www.nextnano.com/​nextnano3/​input_parser/​keywords/​output-file-format.htm|VTK data format]] (rectilinear grid)  -  scalar field $f(x,y,z)$ or vector field $\mathbf{F}(x,​y,​z)$.+  * ''​.fld''​ - 1D/2D/3D [[http://​www.nextnano.com/​nextnano3/​input_parser/​keywords/​output-file-format.htm|AVS data format]] (rectilinear grid)  -  scalar field $f(x,y,z)$ or vector field $\mathbf{F}(x,​y,​z)$.
  
 If a file extension is unknown it is treated as if it were a ''​.txt''​ file. If a file extension is unknown it is treated as if it were a ''​.txt''​ file.
Line 87: Line 89:
  
 The data of **2D/​3D-plots** is directly stored within the *.plt file, so there is nothing to consider when moving these files. The data of **2D/​3D-plots** is directly stored within the *.plt file, so there is nothing to consider when moving these files.
-(So why isn't this done alike for 1D-plots? Because with the overlay feature you have the possibility to export nearly unlimited *.dat files in only one *.plt file. If all this data would be duplicated and transferred into the *.plt file, it would simply ​become ​to big.) +(So why isn't this done alike for 1D-plots? Because with the overlay feature you have the possibility to export nearly unlimited *.dat files in only one *.plt file. If all this data would be duplicated and transferred into the *.plt file, it would simply ​get to big.) 
    
  
Line 95: Line 97:
  
 ===== Format options ===== ===== Format options =====
 +To edit gnuplot commands, open the <​nowiki>"</​nowiki>​.plt<​nowiki>"</​nowiki>​ file with your text editor.
 +
 +=== Semi-log plot ===
 +  * ''​set logscale x''​
 +  * ''​set logscale y''​
  
 === Change the line thickness (''​lw 4''​) === === Change the line thickness (''​lw 4''​) ===
Line 108: Line 115:
   * ''​plot '​D:​\density_hole.dat'​ using 1:2 title <​nowiki>"</​nowiki>​p (10^18 cm^-3)<​nowiki>"</​nowiki>​ noenhanced <​nowiki>​...</​nowiki>''​   * ''​plot '​D:​\density_hole.dat'​ using 1:2 title <​nowiki>"</​nowiki>​p (10^18 cm^-3)<​nowiki>"</​nowiki>​ noenhanced <​nowiki>​...</​nowiki>''​
  
-=== Change range $[x_{min},​x_{max}]$ and $[y_{min},​y_{max}]$ of graph ===+=== Change range $[x_{min},​x_{max}]$ and $[y_{min},​y_{max}]$ of the graph ===
   * ''​set xrange [-0.3:​100.3]''​   * ''​set xrange [-0.3:​100.3]''​
   * ''​set xrange [0:​100]''​   * ''​set xrange [0:​100]''​
Line 114: Line 121:
   * ''​set yrange [-1.0:​0.5]''​   * ''​set yrange [-1.0:​0.5]''​
  
-=== Remove grid ===+=== Set/Remove grid ===
   * ''​set grid''​   * ''​set grid''​
   * ''​unset grid''​   * ''​unset grid''​
Line 122: Line 129:
   * ''​set border lw 3''​   * ''​set border lw 3''​
  
-=== Remove legend ===+=== Set/Remove legend ===
   * ''​set key on <​nowiki>​...</​nowiki>''​   * ''​set key on <​nowiki>​...</​nowiki>''​
   * ''​set key off <​nowiki>​...</​nowiki>''​   * ''​set key off <​nowiki>​...</​nowiki>''​
  
-=== Remove box around legend ("​box"​) ===+=== Set/Remove box around legend ("​box"​) ===
   * ''​set key on <​nowiki>​...</​nowiki>​ box''​   * ''​set key on <​nowiki>​...</​nowiki>​ box''​
   * ''​set key on <​nowiki>​...</​nowiki>​ nobox''​   * ''​set key on <​nowiki>​...</​nowiki>​ nobox''​
  
-=== Increase ​fonz size in legend ===+=== Increase ​font size in legend ===
   * ''​set key on <​nowiki>​...</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif,​14<​nowiki>"</​nowiki>''​   * ''​set key on <​nowiki>​...</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif,​14<​nowiki>"</​nowiki>''​
   * ''​set key on <​nowiki>​...</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif,​18<​nowiki>"</​nowiki>''​   * ''​set key on <​nowiki>​...</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif,​18<​nowiki>"</​nowiki>''​
 +
 +=== Specify the location of legend ===
 +  * ''​set key left top inside <​nowiki>​...</​nowiki>''​
 +  * ''​set key right bottom outside <​nowiki>​...</​nowiki>''​
  
 === Remove line from legend ("​notitle"​)=== === Remove line from legend ("​notitle"​)===
Line 140: Line 151:
 === Add Greek letter to line in legend ("​{/​Symbol G}" "​enhanced"​)=== === Add Greek letter to line in legend ("​{/​Symbol G}" "​enhanced"​)===
   * ''​using 1:2 title <​nowiki>"</​nowiki>​{/​Symbol G} [eV]<​nowiki>"</​nowiki>​ enhanced''​ produces $\Gamma$   * ''​using 1:2 title <​nowiki>"</​nowiki>​{/​Symbol G} [eV]<​nowiki>"</​nowiki>​ enhanced''​ produces $\Gamma$
 +  * e, l, m, q produce $\epsilon, \lambda, \mu, \theta$, respectively. ​
 +
 +=== Add a label to the point $(x,y)$ in the plot ===
 +  * ''​set label <​nowiki>"</​nowiki>​label<​nowiki>"</​nowiki>​ at 0.5,​1.5''​
 +
 +=== Add an arrow ===
 +  * ''​set arrow from 1.5,0.3 to 4,​2''​
 +
 +=== Graph Title ===
 +  * ''​set title <​nowiki>"</​nowiki>​title<​nowiki>"</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif,​18<​nowiki>"</​nowiki>''​
  
 === Generate high quality graphs === === Generate high quality graphs ===
Line 146: Line 167:
   * Open the saved ''​.svg''​ file with Inkscape ([[https://​inkscape.org|www.inkscape.org]])   * Open the saved ''​.svg''​ file with Inkscape ([[https://​inkscape.org|www.inkscape.org]])
   * ''​File''​ => ''​Export .PNG Image...''​ => Select ''​Drawing''​ => ''​Export''​   * ''​File''​ => ''​Export .PNG Image...''​ => Select ''​Drawing''​ => ''​Export''​
 +
 +====== 3D Visualization:​ Paraview ======
 +  - Install the free software [[https://​www.paraview.org|Paraview]] on your computer
 +  - Within nextnanomat:​
 +     - in '​Tools'​ >> '​Options'​ >> '​View',​ write the path of the Paraview executable in the user computer, e.g. ''​C:​\Program Files\ParaView 5.6.0-Windows-msvc2015-64bit\bin\paraview.exe''​
 +     - Select a 3D ''​.vtr''​ file of the simulation output folder and click on the '​Export and open in specific format'​ button. Choose 'Open File with Paraview'​ ( Paraview will open automatically.)
 +  - Withing Paraview:
 +     - (The selected file should be automatically highlighted in Paraview.) Click on '​Apply'​.
 +     - Other settings:
 +       - Representation:​ Surface
 +       - Cell/Point Array Status: Choose the array to be displayed. For example, one can display the file ''​bandedges.vtr''​ and choose the array ''​Gamma''​ that corresponds to the \Gamma conduction band. Click on '​Apply'​.
 +       - Coloring: Choose the array to be displayed. (Gamma, in this example)
 +
 +Now you can play with the tool rotating, changing opacity and adding filters.
 +Paraview is a very rich tool: It requires some time to explore all its capabilities.
 +We recommend investing some time to learn about its filters. First the file should be highlighted and then to click '​Filter'​ >> '​Alphabetical'​
 +Some interesting ones are:
 +  * Edit cells by region
 +  * Calculator
 +  * Contour
 +                ​
 +Using '​File'​ >> 'Save State',​ the compute can store the value of all variables, to reproduce again the representation,​ if necessary (by loading the state). This is useful for generation of scripts.
 +
 +Having more questions, we recommend a good tutorial from TACC, although there exist plenty of examples on the web: [[https://​portal.tacc.utexas.edu/​c/​document_library/​get_file?​uuid=01dd202d-58c6-4b46-8310-b6d7087372ac&​groupId=13601|https://​portal.tacc.utexas.edu/​c/​document_library/​get_file?​uuid=01dd202d-58c6-4b46-8310-b6d7087372ac&​groupId=13601]]
 +