=========== **Display** =========== .. role:: red .. note:: Colour attributes, in the current FEMAG versions, should be declared in strings , e.g. *"red"* instead of *red*. .. admonition:: Command: grf_clear() Deletes the contents of the graphics window. .. admonition:: Command: adapt_windo() Adjusts a section of the graphics window to it contents. .. admonition:: Command: draw_spels() Draw the superelements. .. admonition:: Command: draw_ndchns() Draw node chains. .. admonition:: Command: draw_elem(*elkey, color, mode*) Draw an element in a specified colour **Parameter** | :red:`elkey` element number | :red:`color` colour ("red", "blue", "green") | :red:`mode` 0 : display without edges; 1 : display with edges **Example:** Addressing by element number :: draw_elem(elkey,"blue",0) draw_elem(elkey,blue,0) -- deprecated version .. admonition:: Command: draw_elem(*x, y, color, mode*) Draw an element in a specified colour **Parameter** | :red:`x,y` x,y coordinates | :red:`color` colour ("red", "blue", "green") | :red:`mode` 0 : display without edges; 1 : display with edges **Example:** Addressing by coordinates :: draw_elem(x,y,"blue",0) draw_elem(x,y,blue,0) -- deprecated version .. admonition:: Command: draw_mesh_edge() Draw the mesh. .. admonition:: Command: save_metafile(*file*) Save the contents of the graphics window as an image file. **Parameter** :red:`file` file name, with extension (.eps, .PS, .svg) .. admonition:: Command: plot_2d(*x, y, pos*) Create a line plot in the graphics window based on the pair values *x* and *y* at the position *pos* **Parameter** | :red:`x,y` x,y coordinates | :red:`pos` position code **Example:** :: px, py = {}, {} -- generate example data for i=1,400 do px[i] = i py[i] = math.sin(i/180*math.pi) end plot_2d(pxx,pyx,6) -- plot the diagramm Further display adjustments can be made with arguments that are passed in a data structure like the following example shows. **Example:** Expanded call with optional arguments (opt.). :: plot_2d(x = px, -- x data array y = py, -- y data array pos = 7, -- placement code xmin = 0, -- x range lower limit (opt.) xmax = 400, -- upper limit (opt.) ymin = 0, -- y range lower limit (opt.) ymax = 1, -- upper limit (opt.) xlabel = "xlabel", -- x axis label (opt.) ylabel = "ylabel", -- y axis label (opt.) ylabel2 = "ylabel2", -- sub label (opt.) color = "blue") -- color code or description string (opt.) See also applications examples *Ausgabe von Diagrammen* und *Verwendung von poc-Files in individuellen Berechnungsabläufen*. .. Add Link Add Link