A blog from a scientist and former Debian developer (and occasional book writer)... Tricks for data handling, programming, debian administration and development, command-line and many other joyful things in the same spirit. Oh, and sometimes completely unrelated things !
Friday, January 2, 2015
New home for Tioga
Thursday, December 19, 2013
Rubyforge is dead, but ctioga2 goes on...
ctioga2 away from rubyforge, to sourceforge. Transition went smooth, git is now the only VCS. Code is hosted at sourceforge and mirrored at github.Work goes on on ctioga2. I've recently implemented a decent support for histograms. It is already much more powerful than the one in the old ctioga, but it is far from being feature-full. Here's a preview.I'm slowly preparing a new release for ctioga2, that would incorporate quite some fixes since the last time, and quite a few nice features in addition to the histograms. Stay tuned !
Saturday, October 12, 2013
8 months with a macbook pro retina 15''
After about 8 month, I must say I'm quite pleased with the beast. The retina display is very neat (a 2880x1800 resolution!), and it is pretty fast. There are two annoyances though:
- I never managed to get either the non-free NVIDIA drivers or the integrated intel graphics to work. The NVIDIA driver give blank screen on X startup, while it doesn't even start with the intel drivers (and I've tried all the tricks I could find around). The fine point is that I don't have any hardware 3D acceleration !
- The wireless network is pretty unstable.
Another point is the update of GRUB: Debian's post-install scripts don't play nice with the EFI setup, so here is what I have to do to update to a newer version of grub, (and it's also what I had to do initially to install GRUB):
# mount /dev/sda1 /mnt # grub-install --efi-directory=/mnt
The /dev/sda1 partition is the so-called EFI partition. I think it is created by rEFIt and it is essentially empty.
Monday, October 7, 2013
Release 0.7 of ctioga2
ctioga2 since my last post. Among the most interesting features, ctioga2 now features:- full windows support, including proper file types associations
- fill syntax as powerful as
gnuplot's - an
impulsesplot style - unclipped plot elements along with full control of the curves depth: in front of axes, behind background lines...
- control of symbol size through a Z axis
The latter feature proved actually instrumental in a research project under way in my lab (which is why I wrote it in the first place). It is demonstrated in the image above, made using this code.
I've also started the gnuplot versus ctioga2 gallery I was speaking about in my last post, where I try to reproduce most of gnuplot's examples using ctioga2; it can be found here. While I don't like so much the look of the gnuplot graphs, and I try to keep the look of ctioga2's as close as possible to that look, it proved invaluable in detecting small bugs, fixing small glitches and providing inspiration for new features.
In the meantime, my todo-list for ctioga2 doesn't seem to get any smaller. Let's hope I'll implement them fast enough ! Keep posted...
Wednesday, September 4, 2013
Removing the background of an image
So I dug in ImageMagick's convert documentation, and came up with the following code that converts the PDF file into a PNG with a transparent background:
convert -density 600 figure.pdf -channel alpha \ -fx '((r == 1 && g == 1 && b == 1) ? 0 : 1)' figure.png
There are still some few points that look white but are probably not that white (due to antialiased rendering of the PDF file ?). There are many more things that can be done using the -fx operator, this page was helpful to me !
Edit: while the alpha channel seems to be on by default for PDF files, it is not necessarily the case for all images. If the above doesn't work, try adding -alpha Set before the -fx bit.
Saturday, August 31, 2013
First release of Tioga that works on win32
fopen(file, "w") for binary files, that don't make any difference on Linux and Mac, but that do on Windows...). The release is already available on the rubyforge download page. Gems will be available later on today.To actually make it work on windows, here is what you need to install:
- Ruby, using the one-click installer. The 1.9.3 version works just fine. Don't forget to click the box to add the executables to the PATH
- the Ruby DevKit, at the same location. Make sure you take the one matching the Ruby version you installed (there's an explicative text on the side). You need to unpack it in the directory where Ruby got installed
- you need to get a LaTeX distribution, try out proTeXt
- at this point, you may need to reboot
- then, just open a windows terminal (Execute
cmd.exe) and run:
gem install tioga
And that's it ! That also means that ctioga2 works on windows, if you run:
gem install ctioga2
Tuesday, August 27, 2013
Announcing version 0.5 of ctioga2
0.5 of ctioga2, my plotting program. While there is still quite a lot of improvements I'd like to get in some day, the past few days have seen a lot of activity. Probably the most important change is the new space-separated command file format, much simpler than the old one (which is still supported, although marked clearly as deprecated now). Another important change for the users is the large improvement of error reporting: in most cases, ctioga2 pinpoints the exact location where things go wrong; it also features reporting on LaTeX errors. The last important feature is also the introduction of real contour plots, such as the one below, coming from the documentation:Now, I feel like ctioga2 is coming close to gnuplot in terms of features and ease of use. Part of my plans for the website is to create a gnuplot mockup gallery, in which I would take as many examples from the gnuplot website as possible (ie all the ones ctioga2 can reproduce) and compare the code and look of both.
Among features I'd like to implement for ctioga2, here are the ones that I think are the most important ones:
- plot styles (histograms, bars, impulses), in the spirit of the
plot withinstruction of gnuplot - complex axes: broken axes and linked axes
- full control of the tick labels and positions (alternative formats, placing ticks at multiples of π, and labelling them as such...)
- full styling using CSS-like stylesheets
- a windows port would be nice, too
But maybe you have other ideas you'd like to see before that ?


