Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision |
| documentation:language_reference:objects:graphics:start [2026/11/12 18:37] – created Maurits W. Haverkort | documentation:language_reference:objects:graphics:start [2026/11/12 18:43] (current) – Maurits W. Haverkort |
|---|
| |
| ### | ### |
| Quanty makes its own plots; no gnuplot or other program is needed. A Graphics object is a page with lines, curves, dots, texts and bitmaps on it. It is made by one of the plot functions, for example //[[documentation:language_reference:objects:graphics:functions:plot|Graphics.Plot()]]// for spectra and response functions or //[[documentation:language_reference:objects:graphics:functions:plotbands|Graphics.PlotBands()]]// for band structures, or as an empty page by //Graphics.New()//. //Graphics.ToSVG(pl)// and //Graphics.ToPS(pl)// turn a Graphics object into the text of an svg or an encapsulated PostScript file. An svg file can be opened in any web browser and in drawing programs such as Inkscape; a PostScript file can be included in LaTeX or turned into a pdf. | A Graphics object is a page with lines, curves, dots, texts and bitmaps on it. It is made by one of the plot functions, for example //[[documentation:language_reference:objects:graphics:functions:plot|Graphics.Plot()]]// for spectra and response functions or //[[documentation:language_reference:objects:graphics:functions:plotbands|Graphics.PlotBands()]]// for band structures, or as an empty page by //Graphics.New()//. //Graphics.ToSVG(pl)// and //Graphics.ToPS(pl)// turn a Graphics object into the text of an svg or an encapsulated PostScript file. An svg file can be opened in any web browser and in drawing programs such as Inkscape; a PostScript file can be included in LaTeX or turned into a pdf. |
| ### | ### |
| |
| |
| ### | ### |
| A Graphics object has a size in mm, //pl.SizeX// by //pl.SizeY//. The plots of //Graphics.Plot// are an A4 page in landscape, 297 mm by 210 mm. Everything on the page is given relative to it: a point is a fraction of the width and of the height of the page, with (0,0) the lower left and (1,1) the upper right corner, and the width of a line and the height of a text are fractions of $\sqrt{\mathrm{width} \cdot \mathrm{height}}$. A page of another size therefore gives the same plot, larger or smaller, and a page of another shape the same plot stretched. | A Graphics object has a size in mm, //pl.SizeX// by //pl.SizeY//. Standardly the plots of //Graphics.Plot// are an A4 page in landscape, 297 mm by 210 mm. Everything on the page is given relative to it: a point is a fraction of the width and of the height of the page, with (0,0) the lower left and (1,1) the upper right corner, and the width of a line and the height of a text are fractions of $\sqrt{\mathrm{width} \cdot \mathrm{height}}$. A page of another size therefore gives the same plot, larger or smaller, and a page of another shape the same plot stretched. |
| ### | ### |
| |
| ### | ### |
| |
| {{:documentation:language_reference:objects:graphics:dos.png?nolink |}} | {{:documentation:language_reference:objects:graphics:dos.png?400nolink |}} |
| ===== Table of contents ===== | ===== Table of contents ===== |
| {{indexmenu>.#2}} | {{indexmenu>.#2}} |