News for hackers. Stuff that matters.
Re:High quality graphics for Latex documents: The Matlab route by Y_Y on Friday March 17, 2017 @09:01AM (#13893596)
Gnuplot is something i categorise with Fortran and hand writing latex as "I use use it because my advisor used it, and he used it because his advisor used it...". I understand that they were once the best tool for the job and they still work, but better alternatives have emerged since, e.g. matplotlib, C++/numpy and LyX respectively. I know this is a subjective matter but i feel it's a shame that a lot of scientist don't shop around and hence end up stuck with the "classical" option.
Re:High quality graphics for Latex documents: The Matlab route by chestervonwinch on Friday March 17, 2017 @10:49AM (#13894347)
Have you used Fortran? Have you tried f2py, which converts Fortran modules into NumPy compatible Python modules? I would rather use Fortran over C++ in a heartbeat for scientific computing. For what it's worth, I thought for years that Fortran was an old crusty language, not worthy of my time, choosing to use C++ instead, and I regret not picking it up sooner.
Re:High quality graphics for Latex documents: The Matlab route by semi-extrinsic on Friday March 17, 2017 @01:06PM (#13895718)
In modern Fortran, there is only really one big headache (coming from e.g. Python), and that's how hard string processing is, and how there are no generic lists. E.g. something as simple as cpnverting an integer to a string (or vice versa) actually uses I/O and writes/reads from the int to the string. (I have written Fortran code that outputs data both in JSON, CSV, proprietary binary formats and as XML at various points in time. It's not generally pleasant.)

If a hypothetical Fortran 201x added Python-esque generic lists and list/array comprehensions that played well with strings, and promoted strings to a "first class" type, I'd have a lot less reason for pulling in Python for scientific applications not involving web/graphics.

Re:High quality graphics for Latex documents: The Matlab route by Y_Y on Friday March 17, 2017 @11:02AM (#13894448)
I have used Fortran in a few instances where I was compelled to. I never gave it much of a chance because I didn't like using it, and what's more it isn't nearly as popular as C/Python/Matlab etc. for modern stuff. If popularity (and hence code sharing) wasn't important I'd be using languages I like, like Haskell and Scheme.

All the same your comment makes me think I may have dismissed it too quickly so I'm going to give it another try for my next toy project (even if they index arrays from 1). Thank you.

Re:High quality graphics for Latex documents: The Matlab route by chestervonwinch on Friday March 17, 2017 @11:13AM (#13894538)
> even if they index arrays from 1

They don't have to! You can set the array index bounds to whatever you want. For example,

    real(8) A(0:n-1)
    real(8) w(-p:q)
are both valid declarations and would be indexed by i=0,n-1 and i=-p,q respectively. If you're using gfortran compile with the "-fbounds-check" flag to save a lot of headaches!
Re:High quality graphics for Latex documents: The Matlab route by leephillips on Friday March 17, 2017 @11:11AM (#13894528)
You can index arrays in Fortran any way you want to.

Fortran is popular among people in many disciplines doing large-scale scientific computing. I was surprised to learn a few years ago that C++ had become popular in the high energy physics community; the emphasis there is on crunching vast amounts of data from experiments.

Re:High quality graphics for Latex documents: The Matlab route by davrosthedalek on Friday March 17, 2017 @09:18AM (#13893676)
Let's put it this way: I wrote my diploma thesis in LyX, but went back to emacs+latex for my PhD. I did not regret it. Matplotlib is close, but I get results with gnuplot quicker.

My students all started out using root/matlab/whatever for plots. Except for the matlab guy, sooner or later, they all switched to gnuplot. Not forced by me.

Re:High quality graphics for Latex documents: The Matlab route by Y_Y on Friday March 17, 2017 @11:07AM (#13894499)
So you shopped around and stuck with the thing you like. That's great and nobody could argue with it. In my own department grad students and even wizened old professors are moving away from gnuplot and matlab to matplotlib, but I bet that having "experts" around is a more important factor than anything else.
Re:High quality graphics for Latex documents: The Matlab route by apathy on Friday March 17, 2017 @11:33AM (#13894737)
Why do you quote the word experts?

It doesn't appear that the objective merits of the tools under discussion yield a single best answer. For example, if you look through various implementations of assorted somewhat-esoteric algorithms & formulae, I have found that the FORTRAN implementations are usually cleanest. Not because the language is cleaner or anything like that, but because the most experienced people in the field didn't see the point of bowing to language fashion.

If fashion were the deciding point I suppose we'd all be compelled to use JavaScript, so, yeah. I'd rather not reimplement something that already works right, least of all when it's a fiddle problem and I've got deadlines to hit.

Re:High quality graphics for Latex documents: The Matlab route by Y_Y on Friday March 17, 2017 @01:00PM (#13895649)
I quoted it because, for example, within a small group, I would be the go-to person for "I need software that does X" or "I hate Y, what can I use instead?". I'm by no means an expert in, say, matplotlib, but I have local influence by means of my relative, perceived expertise.

You make a great point. The only thing that I'd add is that a lot of the Fortran code that I'd rely on (large venerable linear algebra and ODE packages) were written a long time ago, when it would have been somewhat less unfashionable.

Re:High quality graphics for Latex documents: The Matlab route by sn41 on Friday March 17, 2017 @09:04AM (#13893609)
Strange. I feel going in the opposite direction. Removing as many fancy latex packages from my documents as possible, because I am worried that my files can't be compiled 10-15 years from now.

I am a tex/latex survivalist :)

Re:High quality graphics for Latex documents: The Matlab route by davrosthedalek on Friday March 17, 2017 @01:15PM (#13895814)
The good thing about latex is that it's pure text. While the ability for nice output might be lost, generally, the intent and content of the document is still extractable.
Re:High quality graphics for Latex documents: The Matlab route by leephillips on Friday March 17, 2017 @09:07AM (#13893619)
I "shopped around" and tried all of these things, and more. I returned to LaTeX and gnuplot because they are better. I'd certainly rather use modern array Fortran than C++.