Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Any help with using GRAPHICS routines ?

WSinc
New Contributor I
726 Views

I was trying to set up an application (Quickwin) but found that the descriptions of how to use the associated routines were woefully inadequate.

In particular,  is  the way we are supposed to have user coordinates. Normally when one plots something, they use their own coordinates for that,

not just pixel coordinates.

Sure, they have moveto_w rather than Moveto, for example, but there are no examples of how to use that.

what they give is really pitiful.

The write-ups for that dont really address that subject. I was hoping there is something out there where they give us some intelligent examples ?

0 Kudos
10 Replies
jean-vezina
Beginner
726 Views

Good evening,

Look at the SCIGRAPH sample code included with the compiler (sample code may not be installed by default).

Regards,

Jean

 

0 Kudos
dboggs
New Contributor I
726 Views

I use Quickwin graphics extensively. Started from scratch. Sure it is tricky, but not really all that difficult. I did acquire a couple of old books--still available I think--that were helpful:

Compaq Visual Fortran--A Guide to Creating Windows Applications by Norman Lawrence

Digital Visual Fortran Programmer's Guide by Etzel & Dickinson

Both will help you with other Quickwin issues such as window control, in addition to graphics.

 

 

0 Kudos
Kevin_D_Intel
Employee
726 Views

The Using Intel® Visual Fortran to Create and Build Windows*-Based Applications has a QuickWin chapter. The Fortran product QuickWin samples are available online here.

One other related discussion:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/298946

0 Kudos
dboggs
New Contributor I
726 Views

Just another note on Quickwin vs. Scigraph: Quickwin is low-level graphics, meaning you can draw primitives--lines, circles, etc. Scigraph is high-level--you can draw xy graphs, 3D graphs, etc. The two products would be very different in meeting your particular needs.

Using Quickwin, I developed my own high-level library to draw xy graphs. I did this because (1) I can make the graphs look exactly like what I need, with the features I need; (2) the graphs become very well integrated with the rest of my code, without the need for creating intermediate data files, and displayable in "real time" for the users enhanced I/o experience; (3) about 95% of my graph needs are xy plots; (4) I don't have to buy worry so much about a third-party product (Scigraph in this case) going belly-up in the future. Been there, done that, not fun.

Of course, others will have different needs and preferences and a product like Scigraph may then have have its own list of benefits.

Intel, listen up: keep supporting, even enhancing, Quickwin!

0 Kudos
Steve_Lionel
Honored Contributor III
726 Views

FWIW, Scigraph is built on top of QuickWin.

0 Kudos
dboggs
New Contributor I
726 Views

Thanks Steve. I was perhaps a little too quick with some of my discussion. Much of it was actually directed at other 3rd-party products, in particular Gnuplot, which I confused with Scigraph. Because of its background, Scigraph is inherently well integrated into the Fortran code unlike other 3rd-party products.

Knowing its basis on Quickwin raises some questions about Scigraph. Sure it's good at showing graphs on the screen, but what about saving them in files, and at what resolution and format? This doesn't seem to be covered in the Scigraph documentation or examples. In developing my own library I have figured out how to save graphs in tif files at practically unlimited resolution, suitable for hard-copy publication. Nevertheless I would also like to be able to save them in vector files (such as wmf or emf), but Quickwin is not capable of this. Same with Scigraph?

0 Kudos
Steve_Lionel
Honored Contributor III
726 Views

QuickWin is able to save bitmaps. SciGraph is ancient (it came from Microsoft) and is more an example of what one can do with QuickWin than an attempt to be a full-featured graphing program. It does its job well, though.

0 Kudos
rorban
Beginner
727 Views

dboggs wrote:
.

Knowing its basis on Quickwin raises some questions about Scigraph. Sure it's good at showing graphs on the screen, but what about saving them in files, and at what resolution and format? This doesn't seem to be covered in the Scigraph documentation or examples. In developing my own library I have figured out how to save graphs in tif files at practically unlimited resolution, suitable for hard-copy publication. Nevertheless I would also like to be able to save them in vector files (such as wmf or emf), but Quickwin is not capable of this. Same with Scigraph?

I use PGPLOT with QuickWin, PGPLOT can write high-quality PostScript files, which can be turned into .eps (Encapsulated PostScript)  resolution-independent vector graphics files, so it is certainly possible to get publication-quality graphics out of a Fortran program built on QuickWin. Although PGPLOT is very old, it produces good results for me.

Instructions on building PGPLOT for QuickWin are here: https://sukhbinder.wordpress.com/category/pgplot/

PGPLOT's homepage is here: http://www.astro.caltech.edu/~tjp/pgplot/ ;

The workflow can get a bit complicated.

IIRC, Ghostscript allows you to convert .ps files to .eps files. Many graphics programs (like Adobe Illustrator) can handle .eps files and can convert to other file formats if you wish. Illustrator will also import .ps files directly.

The bad news is the Microsoft Office doesn't handle .eps files particularly well anymore (the last version that did was Office 2003). Word will print .pdf files while preserving the vector graphics in .eps images, but if you use either the Acrobat plug-in or the Save As PDF option to create pdfs that convert Word Bookmarks to hyperlinks in the pdf, the .eps bitmap preview is what prints, not the vector graphics, and it tends to look awful.

Office's current preferred vector graphics format is .emf, which will produce vector graphics in pdf files made by all of the methods I described above. While Illustrator will open .eps files and export .emf files from them, to preserve the best visual quality, I have had better luck with CorelDraw.

The exported .emf files tend to have a few problems with fonts compared to the .eps source files, but the conversion of a PGPLOT-sourced .eps file to .emf typically goes smoothly because the characters are drawn as vectors using PGPLOT's built-in fonts. 

 

 

0 Kudos
dboggs
New Contributor I
727 Views

Ah, yes--the complex and confusing world of high quality graphics. Unfortunately many many people do not care about this because they only look at it on their computer screen.

I agree that vector files have great advantages. Trapped in the Windows world myself, I have a hard time coping with the .eps stuff partly because of the issues you mentioned. In Windows, I find that .emf works best but unfortunately Quickwin cannot do those. Nor any other vector format.

But, working with a couple of publishers, I find that they actually have a preference for bitmap files, in part because the .tif or .gif format is more universal and less prone to problems on the various platforms. The publishers do tend to require very high resolutions, typically 1200 dpi. Fortunately Quickwin is quite capable of this, although it requires a couple of significant steps that are not documented. (I just hope it continues to work and Intel does not screw it up.)

Also, unfortunately, Microsoft Word no longer handles bitmaps with even 300 dpi with the same grace and quality that it used to (probably since Office 2003, as you hinted at.) They come out a little fuzzy now.

Oh well...

0 Kudos
Gerdes_Gerhard_J
Beginner
727 Views

If you need a graphics routines for scientific purposes, 2D and 3D, DISLIN is a good solution for Fortran, C++ and other languages. It is software from a solar research institute and free available for personel usage. I use it since a long time now and it fully fulfills my needs.  It is availble at http://www.mps.mpg.de/dislin/. You can also use it in parallel with quickwin.

0 Kudos
Reply