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 [2020/06/08 17:20]
stefan.birner [3D Visualization: Paraview]
— (current)
Line 1: Line 1:
-====== Output format ====== 
  
-nextnanomat can display the following output formats. 
- 
-  * ''​.txt''​ - The file is displayed as a **text**. 
- 
-  * ''​.dat''​ - The file is displayed as a **graph**, e.g. scalar field $f(x)$ or vector field $\mathbf{F}(x)$.\\ <​code>​ 
-x1      f(x1) 
-x2      f(x2) 
-... 
-xn      f(xn) 
-</​code>​ or <​code>​x1 ​     f1(x1) ​     f2(x1) ​  ​f3(x1) ​  ​f4(x1) ​  ​... ​  ​fm(x1) 
-x2      f1(x2) ​     f2(x2) ​  ​f3(x2) ​  ​f4(x2) ​  ​... ​  ​fm(x2) 
-... 
-xn      f1(xn) ​     f2(xn) ​  ​f3(xn) ​  ​f4(xn) ​  ​... ​  ​fm(xn) 
-</​code>​ 
- 
-  * ''​.mtx''​ or ''​.mat''​ - **Matrix** format for e.g. a matrix, a table, a $f(x,y)$ graph. The $x$ and $y$ axes are labeled with integer numbers.\\ <​code>​ 
- ​A11 ​    ​A12 ​    ​A13 ​   ...    A1n 
- A21     ​A22 ​    ​A23 ​   ...    A2n 
- ... 
- Am1     ​Am2 ​    ​Am3 ​   ...    Amn 
-</​code>​ 
- 
-  * ''​.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. 
- 
-  * ''​.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. 
- 
-====== Visualization ====== 
-===== Menu ===== 
-The menu contains the most important functions to visualize the output data. 
-{{ :​nnm:​doku_out_menu.png?​nolink |}} 
- 
-===== Panels ===== 
-More specific functions have their own panel. (For convenience some of them can be hidden.) ​ 
-Their location is shown in the following picture: 
-{{ :​nnm:​doku_out_1doverlay.jpg?​nolink |}} 
- 
-For 2D- or 3D-plots there are additionally panels for the displayed plane (xy, xz or yz) and its position, as well as the horizontal and vertical slices. 
-{{ :​nnm:​doku_out-vis_slice3d.jpg?​direct&​600 |}} 
- 
-====== Overlay feature ====== 
-For the best experience when visually analyzing the results of the simulation, it is sometimes necessary to look at different files at the same time. We call this the Overlay feature. 
- 
-{{:​nnm:​overlay.jpg?​nolink&​300 |}} 
- 
-  - Just select the plots of the file you want to memorize. Use the variables panel for selection. 
-  - Click the ''​Add to Overlay''​ button. 
-  - Select another output file. 
- 
-⇒ Your memorized plots will be displayed in gray. 
- 
-You can check and edit the content of your overlay in the overlay list (Don't know where to find it? Read previous chapter [[nnm:​visualization#​Panels|Panels]]). You can also export the selected graphs to an image file, see next chapter for more details [[nnm:​visualization#​Gnuplot export|Gnuplot export]]. 
- 
- 
-====== Export ====== 
-===== All options ===== 
-All of the export options are available from the **context menu** (right-click on the visualization). 
-{{ :​nnm:​export_context.jpg?​direct&​400 |}} 
- 
-===== Gnuplot export ===== 
-Only the gnuplot-export is also available from the output main menu. 
-==== 1D-file ==== 
-**But in 1D there is a slight difference!** 
-When the gnuplot-export is started in the **global menu**, all (and only) the items of the **overlay list** will be exported. With this feature more than a single file can be exported (e.g. the bandedge and the electron probability density): 
-{{ :​nnm:​doku_out_export_gnuplt1d.jpg?​direct&​400 |}} 
-When started in the **context menu**, only the **currently displayed file** will be exported. 
- 
-==== 2D/3D-file ==== 
-When exporting a 2D- or 3D-file, you have some additional options for your gnuplot file: 
-{{ :​nnm:​export_gnuplt23d.jpg?​nolink |}} 
-The option ''​color map (2D)''​ will export a file with the same style as it is displayed in the next**nano**mat. 
-The other options create surface plots (pseudo 3D-plots): 
-{{ :​nnm:​hexagon_psi2_ev10.png?​direct&​400 |}} 
-Title and labels are optional and if they aren't specified they will be taken directly from the file (if provided). 
-If ''​remember settings''​ is checked, the next time the panel will be pre-filled with these settings. ​ 
-If you always use the same settings and don't want this dialog to be displayed each time, you can chose the ''​Create Gnuplot file - last used (*.plt)''​ - option in the context menu. 
- 
-==== Requirements for gnuplot export ==== 
-To visualize the *.plt files, the freely distributed software //Gnuplot// has to be installed on your device. For information and download visit [[http://​www.gnuplot.info/​|Gnuplot website]]. 
-If Gnuplot is installed on your device, the created file will be opened automatically. 
- 
-==== Moving plot-files to another device ==== 
-**1D-plots** are linked to the original *.dat file(s). So if you want to move your plot to another device you can either save your plot as *.pdf/​*.svg/​*.png directly in gnuplot (recommended),​ or if you want to move the original *.plt-file you also have to move all necessary *.dat files (the paths can be adjusted when opening the *.plt file with a text editor). 
- 
-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 get to big.)  
-  
- 
-{{ :​nnm:​record_2017_01_11_08_48_14_78.gif?​direct |}} 
- 
-====== Optimize your Gnuplot Graph ====== 
- 
-===== 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''​) === 
-  * ''​plot '​D:​\bandedges.dat'​ linetype rgb <​nowiki>"</​nowiki>#​FF0000<​nowiki>"</​nowiki>​ pt 5 <​nowiki>​...</​nowiki>''​ 
-  * ''​plot '​D:​\bandedges.dat'​ linetype rgb <​nowiki>"</​nowiki>#​FF0000<​nowiki>"</​nowiki>​ pt 5 lw 4 <​nowiki>​...</​nowiki>''​ 
- 
-=== Change font size of the x axis (''​20''​) === 
-  * ''​set xlabel <​nowiki>"</​nowiki>​position (nm)<​nowiki>"</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif<​nowiki>"</​nowiki>''​\\ 
-  * ''​set xlabel <​nowiki>"</​nowiki>​position (nm)<​nowiki>"</​nowiki>​ font <​nowiki>"</​nowiki>​sans - serif,​20<​nowiki>"</​nowiki>''​ 
- 
-=== Use subscript and superscript (''​enhanced''​ vs. ''​noenhanced''​) === 
-  * ''​plot '​D:​\density_hole.dat'​ using 1:2 title <​nowiki>"</​nowiki>​p (10^{18} cm^{-3})<​nowiki>"</​nowiki>​enhanced <​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 the graph === 
-  * ''​set xrange [-0.3:​100.3]''​ 
-  * ''​set xrange [0:​100]''​ 
-  * ''​set yrange [-1.5:​2.5]''​ 
-  * ''​set yrange [-1.0:​0.5]''​ 
- 
-=== Set/Remove grid === 
-  * ''​set grid''​ 
-  * ''​unset grid''​ 
- 
-=== Change thickness of the border (''​lw''​) === 
-  * ''​set border lw 2''​ 
-  * ''​set border lw 3''​ 
- 
-=== Set/Remove legend === 
-  * ''​set key on <​nowiki>​...</​nowiki>''​ 
-  * ''​set key off <​nowiki>​...</​nowiki>''​ 
- 
-=== Set/Remove box around legend ("​box"​) === 
-  * ''​set key on <​nowiki>​...</​nowiki>​ box''​ 
-  * ''​set key on <​nowiki>​...</​nowiki>​ nobox''​ 
- 
-=== 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,​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"​)=== 
-  * ''​plot '​D:​\bandedges.dat' ​ using 1:2 title <​nowiki>"</​nowiki>​E_c <​nowiki>"</​nowiki>​ <​nowiki>​...</​nowiki>''​ 
-  * ''​plot '​D:​\bandedges.dat' ​ using 1:2 notitle <​nowiki>"</​nowiki>​E_c <​nowiki>"</​nowiki>​ <​nowiki>​...</​nowiki>''​ 
- 
-=== Add Greek letter to line in legend ("​{/​Symbol G}" "​enhanced"​)=== 
-  * ''​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 === 
-  * In gnuplot window: Click on ''​Export plot to file''​ 
-  * Save as ''​SVG files (*.svg)''​ 
-  * Open the saved ''​.svg''​ file with Inkscape ([[https://​inkscape.org|www.inkscape.org]]) 
-  * ''​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 
nnm/visualization.1591629656.txt.gz · Last modified: 2020/06/08 17:20 by stefan.birner