Message Boards Message Boards

0
|
6611 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Is gray the best color for output of Quantity units?

Posted 8 years ago

Why did Wolfram decide to display output units in a gray color? For example:

Quantity[125.3 \[PlusMinus] 0.6, "Gev/SpeedOfLight"] 

These are usually significant results of a calculation or measurement. Displaying output in gray rather de-emphasizes the result. Would Phys Rev print the above result in gray rather than black? The syntax coloring in Input cells is quite useful. However, Wolfram imposed coloring in Output cells is dubious at best. There is no standard for coloring or shading results in printed papers and it can be easily misunderstood.

QuantityForm doesn't seem to be designed to remedy this and Style appears not to work. If you are into designing your own style sheets then modifying the style for "QuantityPanel" (from the Core style sheet) can fix it.

5 Replies

In my installation the "QuantityPanel" FontColor is RGBColor[{0.498, 0.4196, 0.3294}]. As I said, you have to dig down to the Core style sheet to find it.

In a Mathematica notebook you can tell it's a unit because, when hovering over it, it's in a Panel with a lighter gray background and it has a Tooltip.

There is no reason that the FontColor should be so faint, or anything other than Black. That's the issue I'm raising. Why shouldn't Output look like you might see in a standard technical paper?

That is indeed the same color I mentioned; brownish color:

Rasterize[Style[Quantity[14, "Electronvolts"], 100]] // ImageData // Flatten[#, 1] & // Tally // SortBy[Last] // Part[#, -2, 1] &

As said before, if you look at my example, you would not be able to see what is what. (only if you happened to hover over it, which I just discovered because you mentioned). That said, a visual clue is very nice. I like it very much.

What you call an issue, i would call a very useful feature. If you want to put it in your paper you can use something like:

ToString[Quantity[14, "Electronvolts"]]
ToString[Quantity[14, "Electronvolts"], TraditionalForm]

to make it in to a string that you can style the way you want using Style.

POSTED BY: Sander Huisman

Actually one could use

Quantity[14, "Electronvolts"] // TraditionalForm

I still can't understand why anyone would want a light brownish grey output for an important quantity in StandardForm.

This brings up a difference in style in using Mathematica notebooks. I believe most users use them as worksheets or scratchpads. If they are going to write a document for other people they copy out results, sometimes literally by hand, to LaTex and publish a pdf document. But I claim that Mathematica notebooks, with their active and dynamic character, are so superior it would be better to write literate notebooks in the first place. And that means that significant Output would naturally be in black.

The idea that most users who are seriously using units wouldn't know what happens when you hover over them or that there would be many cases where something that looked like a unit would not be a unit are not very strong justifications. Would you claim that a physics journal should use brownish grey for any result that contained units just so the reader knew they were units and not some symbol?

If users want a faint brownish grey for Output then that's what they'll get.

Would you claim that a physics journal should use brownish grey for any result that contained units just so the reader knew they were units and not some symbol?

That is not what I said or meant, clearly. A book is completely different from a Mathematica notebook, the first being designed for print, while the notebook isn't. It can be printed, but firstly it is a combination of code and output. In physics we never use symbols that are called 'eV' et cetera, that's why they use greek symbols and subscript et cetera.

I think the difference is that you see the notebook as a real 'book', while I clearly don't. I don't see the nb as a 'final product'. Of course you can use it to make books, but I think there are (much much) better tools for that. I can't think of a physics journal that would accept a mathematica nb file to submit the publication.... I see the mathematica notebook as code and output, interleaved, nothing more. If I want to publish something, I export my graphs/data et cetera to (say) PDF et cetera and typeset it in specialised software and publish it.

POSTED BY: Sander Huisman

I would guess the idea is that you can distinguish it from (undefined) variables:

enter image description here

But the choice of the actual color appears to be semi-random indeed. I see the color as RGBColor["#7f6b54"] by the way (Mac interface).

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract