First of all, let me thank you all for your answers! I will try to benchmark all your suggestions.
My usecase is similar to @purplishrock. We perform accelerated aging tests on semiconductors and compute electrical parameter drifts. For documentation purposes, we need to generate such plots, which usually go in some form of report along with data tables in excel. It’s not the most elegant solution but everyone can review the excel results.
The current solution is written in Matlab, and it implies roughly three steps: data processing, plot generation, excel report generation. Naturally, it takes ages to complete, so I profiled the coded and found bottlenecks at every step.
I might not be able to speed up the third one, because excel generation relies actually on calling VBA macros and using COM, but I want to give it a shot and improve steps #1 and #2 by using Julia. I would also like to port step #3 but I’m struggling a bit because I have to actually write VBS code and invoke it, as Julia doesn’t have any COM integration to easily modify excel files to add pictures inside.
To be fair, it’s often hard to pinpoint what one doesn’t like about something subjective – like trying to explain why you don’t like cilantro.
Anyway, if running with CairoMakie is recommended, and that’s actually what’s shown in the code examples there, then the plots on that page could be produced with CairoMakie for accuracy. They’ll also look better.
The other thing I’d say about those demo plots is that I’d prefer a different color selection. To my eyes, the plain :red, :blue, :green in the examples don’t look as good as some other choices (like viridis or plasma or whatever AoG is using).
Sorry, and this is part of why I mostly haven’t voiced my opinion on the default style in Makie.
I really just don’t have a sophisticated enough visual taste to even be able to voice what I don’t like or suggest changes. The best I can do is point at styles I do like. E.g. I was pretty excited when I saw GitHub - JuliaPlots/MakieThemes.jl: Themes for Makie because I thought it looked quite good apart from the font, but then development on it didn’t continue.
I really don’t mean to denigrate the great work you all have put into Makie and I’m sorry that my comment was so unproductive.
Oh the other reason for fuzzy plots on the website right now is that we changed the default to png, but the default setting is again not supersampled. I wanted to change back to crisp svg for the website but due to a bug that’s reset to png in every example. I’ll follow up with that, it looked much better two weeks ago.
Then the colors like red blue green, I agree these don’t look so nice and I’m all for changing them, sometimes it’s just a lack of inspiration when writing these examples. Just want to show how to change color, so… red? I’m open to improving these, especially if they lower the apparent quality of the library. It’s similar with some example plots, sine waves get old pretty fast but it’s the easiest thing short of random dots
Ah it’s ok, sometimes such comments just strike a nerve. I did put a lot of effort into the default styles, but with the goal to give a solid base to work from, that works for a lot of people. AlgebraOfGraphics on the other hand is much more opinionated, styled to the taste of Pietro. It’s useful to know for example if almost everybody thinks the ticks are too short, then they can be lengthened. But frame lines can either be shown or not, so some people will always dislike the default choice. So I’ve tried to make every little detail themeable, if the options are unclear docs issues are always appreciated.
Compromise: blinking lines, then you only dislike the default choice half the time!
Fwiw I haven’t given much thought to theme choices so this is a theme-naive perspective (with ggplot2 background) but I’ve been using Makie for a while and I’m generally happy with how its SVGs look by default.
It’s interesting how much importance people place on defaults. I was a GGplot2 guy, before moving to Julia. That package has really ugly defaults. But they are very easy to change with themes/theme elements.
I never liked the default look of Plots.jl, so I was attracted to Makie and especially AoG which are both great! However, I recently had to add some new plots to a manuscript that already contained some nice GGplot2 plots that I’d embedded in LaTeX using TikzDevice. It ended up being really simple to copy the style of those other plots in a few lines of code with plots.jl and save the output as .tex. Anyway I’m just rambling, but the upshot is I pay less attention to defaults now. For my purposes (mainly 2d scatter, lines boxplots, violins) plots.jl is more than up to the task.
Yes it’s important that theming is effortless, and we can improve on that front. It would be best if it’s as easy as saying set_theme!(:minimalistic) or something like that to get a good set of different defaults. And that people can share their themes easily.
My understanding is that it’s incredibly hard to pick defaults for a wide audience, but I do think that Makie does a good job at providing solid conservative defaults.
Changing to a custom theme is less scary than it sounds. AlgebraOfGraphics (see e.g. the penguin tutorial to get a feeling of the style) has a much more opinionated look, which is achieved via Makie’s theming mechanism. Even though the theme is based on solid design principles, I’m not sure it could be Makie’s default theme.
This is how the theme is defined. It is a fair amount of attributes, but to create your theme you can probably just copy-paste the example and tweak things you don’t like. Note that you can try it out in normal Makie plots just by doing using AlgebraOfGraphics; set_aog_theme!(), and it shouldn’t add too much precompilation overhead.
MakieThemes.jl hasn’t been updated in a while, but I think you could also try copy-pasting, and maybe tweaking, any theme in this folder (it’s a separate project from MakieThemes.jl, but maybe they can be merged in the future).
More than that, my fear is that users (esp. in the beginning) often start by copy-pasting examples, so I’m afraid that we are “giving the bad example” with pure red, blue, green colors. Given that we have a default palette, maybe we could pick from there?
This is exactly what I do. That’s why I really miss the old Makie Gallery. I am not enough of a plotting power user to want to really learn everything about a plotting library, so I usually just find examples that have features and looks I like, copy paste them and then adapt it to my use case.
Especially be side I often don’t even know the name for what I’m looking for, so searching through visual examples is way easier than searching text based docs.
I don’t think that making everything a backend of everything else is going to pan out well in the long run.
In the short run it was a perfect stopgap measure: plotting libraries require a lot of investment, because of all the finicky low level details (font/text metrics, various heuristics like axis labeling, etc). But combining wildly different libraries into a single frontend either
gives up on switching backends when you use advanced features, so it is not very useful,
restricts the user to the intersection of features.
IMO Plots.jl is great for exploratory plotting, but becomes really tricky to work with when polishing up plots (eg for a final version of a paper). I think that sticking to a single versatile plotting library from the very beginning may give a better user experience. Which library that will be is a matter of taste and requirements, but now we have multiple great choices.
I am doing something similar here for semiconductor testing. We have test systems which generate large quantities of data in the form of test files, most of which are similar to CSV files.
I am generating the report which includes thousands of plots in the data section of the report.
This accompanies a statistical summary, which is what everyone looks at. But if there is something strange the data report is available and you can usually track down the problem data quickly.
I’m not using Excel. I am generating the plots in PDF and generating a PDF report using LaTeX.
This could include tabular data if required, thus removing the requirement for Excel or other external tool.
But you have to have some detailed knowledge of LaTeX to get it all working.
The result is efficient PDF report files which are easy to examine and digest.
For most plots I am using Gadfly which is quite fast. I need to generate histograms, and I couldn’t get the Gadfly based histograms quite correct. So I switched to PGFPlotsX and got better control of the histograms.
But indeed PGFPlotsX is slow. But there are a couple of things to mitigate this. First, make sure you are using TeX Live! I found it to be about 20 times faster than MiKTeX. You can get a little more speed by parallel processing in the for loops which generate the plots. But you can’t do IO in parallel, so writing the files to disk is done in another loop.
In this use case, speed is not that important and if it takes a while to generate the reports it’s not that big of a deal. Because the entire process of obtaining the data takes a couple of weeks. So an hour or two to generate the reports is a small fraction of that. I run intermediate reports, it’s nice to get that done a little quicker, so that is why I did a little optimization of the histogram generation.