When I show a DataFrame object in the REPL, under each row its supposed to list the Type for each series.
However, in my terminal, the font color for the Types is the same as the background, making them effectively invisible. I know the values are there, as when I highlight the text, the color inversion makes them visible. See attached screenshot.
This is pretty problematic for me, since my IDE is terminal based (nvim) and I’m far too in love with solarized dark to switch to some other color scheme.
Has anyone else dealt with this issue? Since solarized-dark is a pretty common theme, I’m tempted to raise this as an issue in DataFrames.jl package. Should I report this to DataFrames.jl, or is there maybe some other reason for this behaviour?
This happens when I’m running the REPL in the terminal by itself, and also when I use an embedded terminal in nvim.
[edit: I’ll mention I’m on PopOS 21.04, using Tilix… in case others with different terminals/IDEs aren’t running into this issue.]
It can be reported either in DataFrames.jl or PrettyTables.jl, anyway I will ask @Ronis_BR to kindly have look at it :).
However, note that we use dark gray color here. So this is a standard color picked from a set of 16 standard terminal colors. Personally (but it is subjective), I would say that color theme you use should show such a color legibly (what I want to say is that we are not using some fancy and strange color - it is a basic color that normally should be displayed in a legible way). How hard would be to fix your color scheme to display dark gray in a legible way?
B.t.w. how is this table displayed in your terminal?:
I think the problem is with the theme itself. PrettyTables.jl uses, by default, the color dark_gray when printing the subheader (the type in case of DataFrames.jl). I am not sure what we can do here because your theme is apparently using dark_gray as the background also. You have two options, the first one is to disable colors at all by starting Julia with --color=no. The second is to show DataFrames.jl using the option subheader_crayon. Something like this:
The very first version of PrettyTables.jl integration with DataFrames.jl used a global state to configure default options when printing. Unfortunately, it added a huge amount of time to print the first table. I heard that things got much better in Julia 1.7. Maybe we can revisit this to help this kind of issue. What do you think @bkamins ?
@pfitzseb thanks for the info! I just realized that dark_gray and light_black are supposed to be the same
There is two problem. The first one is that you mentioned, which highlights the missing and nothing. The second is the keyword argument subheader_crayon that is passed to pretty_tables. In this case, we will need a global variable to store the default options and let the user change them. PrettyTables.jl already have this mechanism of printing with pre-defined, global options (see @pt_conf). However, it leads to a HUGE degradation in time to print the first table. Last time I checked, I can print a rand(2,2) the first time in less than 1s. If I use the global options, then it increases to more than 4s.
If you think it is worth it I think you can open an issue in DataFrames.jl to track it and discuss if this is needed. However, I think it is a low priority. A priority should be to have sensible defaults that work well.
I really did not like this here (black background). It does not make sense to change the default inside PrettyTables.jl since it was design to be easily changed. We can indeed change the default in DataFrames.jl. However, @bkamins must approve that. My personal opinion is that it is not good to change the behavior for everyone because of one theme. The new version does not look good IMHO: