Gnuplot - Windows terminal and save in png/pdf ... (not only .EMF) - gnuplot

I'm using gnuplot to draw graphics by piping the data from my C++ program to gnuplot.exe trough shell. I'm using the windows terminal and it is used exclusively with Windows OS.
However, I can only save the graphic as a .EMF file. How can I extend the windows GUI terminal to support more formats ?

I think that the windows GUI terminal can not be extended.
I have finally switched to the QT interactive terminal as recommended by #gboffi. This terminal permits to export the graph to :
pdf
svg
bmp (via image)
png (via image)
See bellow :
Note that this answer entails that the generated gnuplot.exe will be dependent to some external dlls ( QT5Core.dll ...)

Related

How to set icon(or .ico file) on executable file in linux system?

I've been trying to set icon on executable file(.exe) in linux and macOS.
what I learn is there are 3 places icon sets: on taskbar, window bar, and executable file thumbnail.
I have set on taskbar and window bar, but not on exe file.
(By the way, I've already done on 3 of them in windows using visual studio.)
and I might not know exact term of it, so I will show the example below:
enter image description here
I guess .rc file should be in makefile.
If so, I could solve it also in macOS.
If not, I want to know how to set in linux and macOS too.
Please let me know how to use it and set it. Thanks in advance.
p.s. I set icons on window bar and taskbar using GLFWimage and working on openGL3 & c++.
glfwSetWindowIcon(window, 1, &icon);
I guess .rc file should be in makefile.
While there is a "standardized" way for storing icons in Windows .exe files, there is no such method for "ELF" files (the most common executable file format under Linux).
on taskbar and window bar
The icon used by the window manager (e.g. for the task bar) is typically stored as "X11 window property". A "X11 window property" is some data assigned to a window by a program.
The program must provide the icon image as array and call the function XChangeProperty() (this is what the function glfwSetWindowIcon() indirectly does).
It is not necessary that the icon is stored in a special way (comparable to the .rc file in Windows); the program can simply store the icon in some const array or even calculate the icon image data before calling XChangeProperty().
... but not on exe file.
As I already have written, there is no "standardized" way to store icons in executable files for Linux.
Some file managers "know" certain programs and display the corresponding icons: They know that "xterm" is a terminal program, so they display the terminal icon. However, this icon is not stored inside the executable file but in the file manager: If you rename any executable file to "xterm", the terminal icon will be displayed.
There is an extension named "elfres" (it was named "elficon" some years ago) that allows adding icons to ELF executable files. The web site of that extension is found here. On the linked web site you also find a screen shot with an example - so you can check if I understood you correctly and this is what you are talking about.
Unfortunately, this is a non-standard extension. For this reason a "standard" Linux installation will not check if an executable file contains an icon and therefore not show the icon.
If you use the "elfres" method, you must install a special plug-in; otherwise the icons of executable files are not shown.

Change font style in terminal to a specified .ttf file

I am creating a terminal game which uses a specific font to display graphics. The problem is that it is inconvenient to manually have to switch font every time the game is started and stopped. The game should run on OS X and Linux and should mainly support xterm. Is there any hack which allows this to be automated?
No, there is no generally applicable way of doing this. Sorry.
I can think of a couple specific awful hacks that you could use to change the user's font in specific environments -- for instance, if the user is using macOS and running Terminal.app, you could use Applescript to alter the font. However this trick wouldn't work even if the user were using another terminal in macOS, let alone on Linux.
If you need a specific font, you should write your game to run as a graphical desktop application, rather than in a terminal.

Font smooth issue, fonts are not looking good in Debian QT [Embedded Qt]

I am using qt-x11-opensource-4.8.2 Debian Jessie on BBB Embedded device.
Steps I have tried to solve the Issue:
Configured the Qt font libraries and Transferred to the Board -> configured the font path properly.
Qt Creator Build & Run Changes has been done to run the Qt application on the Embedded device. Added the Environment variables [QTDIR, QT_QWS_FONTDIR & LD_LIBRARY_PATH] to the Build setup.
Downloaded all the QtGui Dependencies libraries for X11 in Embedded device.
X Rendering Extension; used for anti-aliasing, Run the application as cmd: ./Teledyne -xrender
Q_WS_X11 macro is defined in the code for support embedded Linux project, which will Export all X11 related functions.
Used the Qt Resource Embedded Fonts [Roboto & VeraBd] and Run the application
Used the Qt PreferAntialias and PreferFullHinting option to enable the smooth font.
Installed the basic font packages and configure them
cmd : apt-get install ttf-dejavu ttf-liberation
Using the XLFD -X logical font Description
cmd : xfontsel
Tried to change the font width point size and pixel size
Configure the XTT and Created a xtt font folder and loaded the font path to the Xservers session
cmd: xset +fp /usr/share/fonts/X11/xtt
Checked whether the lightdm may depends of the font configuration
created file : ~/.config/fontconfig/fonts.conf
link:https://lists.freedesktop.org/archives/lightdm/2015-April/000785.html
Create a file called .fonts.conf in home directory -> added content for the antialiasing, which will Enable subpixel-hinting and font-smoothing
Link:https://wiki.debian.org/Fonts
Created a Qt application with the few available fonts e.g.dejavu sans,Fixed[Sony],Bitstream Vera Sans,Courier,dejavu serif,Times
Tested the above fonts Qt application in the Device.
Any suggestions what might be causing this Issue ?
Please can any one help me on this, I am struck :(
Thanks in advance.
Are you compiling Qt with support for fontconfig?
We have been having similar problems related to bad rendering and
sometimes even non readable fonts, and after installing the dev
package of fontconfig and recompile Qt with support for fontconfig
everything works as expected.
At the end we've been getting again same problem of fonts being shown incorrectly ( basically bad rendering ) and was because RenderType uses which is defaulted to "Text.QtRendering" and we need to use "Text.NativeRendering" to have the proper rendering on platform used ( linux ).
http://doc.qt.io/qt-5/qml-qtquick-text.html#renderType-prop ->
Select Text.NativeRendering if you prefer text to look native on the
target platform and do not require advanced features such as
transformation of the text. Using such features in combination with
the NativeRendering render type will lend poor and sometimes pixelated
results.
Hope it helps.

Why do Qt form edit boxes and labels look different (sizes and location) on Linux Vs via Cygwin?

We are running a UI developed in Qt 5.2.1. When the UI is viewed via the Cygwin + Xwin interface on a Windows machine, the UI looks good, without any edit boxes moved around. But when it is viewed on the monitor connected to the Linux (Fedora 19) machine, then the edit boxes and other controls on the form are shifted around or the size is different. Since the displays are all telemetry readings, the resizing causes a problem, since we cannot read the data.
Is there a flag that needs to be set or some property of the controls? I am very new to Qt (my first project) and am not sure what is going on.

Mathematica "export" function creates irritating pop-up window when generating graphics

Is there a way to prevent Mathematica(7)'s Export function from creating annoying pop-up windows when it is used to created graphics? I understand that it has to call the front end and use the system's window manager to create the graphics, but when I am running automated generation of a lot of graphics in the background it is extremely disruptive to have these blank windows popping up and disappearing constantly. It occurs when using Mathematica through the front-end and through the kernel for batch jobs.
I can find no discussion on this anywhere, surely I am not the only one who finds this really annoying. My OS is Ubuntu 9.10, perhaps this doesn't happen on other OS's?
I'm running Ubuntu 11.04 and I couldn't get any popup windows when generating graphics in Mathematica 7 or 8.
For example, create a file "makegraphs.m" containing the following
num = 10;
g = Graphics[];
Do[g = Show[g, Plot[Sin[i x], {x, 0, 2 Pi}, PlotStyle -> ColorData[2][i]]];
(*Print[g];*)
Export[FileNameJoin[{$HomeDirectory, "g"<>ToString[i]<>".eps"}], g],
{i, 1, num}];
Exit[]
which you call from the shell using math -noprompt -initfile "makegraphs.m" or math -noprompt -run "<<makegraphs.m",
for command-line switches, see the version 7 documentation: math.
This does not create any frontend windows even when the print statement is uncommented.
Note that graphics never do not normally display when using the Mathematica command prompt: e.g.
:~$ math7
Mathematica 7.0 for Linux x86 (64-bit)
Copyright 1988-2009 Wolfram Research, Inc.
In[1]:= Plot[x,{x,0,1}]
Out[1]= -Graphics-
However, if you are (automatically) loading a package like <<JavaGraphics`, then the command prompt will produce graphics windows - but they won't be blank, nor Mathematica notebook windows.
Maybe you can post some of the code you're using?
Also, have you tried SetOptions[Plot,DisplayFunction->Identity]?
Note that in Mathematica version 8, a script mode has been added (see also math).

Resources