The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [output-formatting]

Specify and control how Mathematica formats its output, including rich text, equations and graphics.

Filter by
Sorted by
Tagged with
46
votes
4answers
9k views

Why does MatrixForm affect calculations?

This is a really newbie question, but it has me confused. Why does this code work without // MatrixForm and doesn't work with ...
19
votes
2answers
5k views

How to make traditional output for derivatives

Hello again after some pause. i have a problem how to present partial derivatives in traditional form, not as Mathematica gave it to me in its notation. So I want to present this ...
24
votes
3answers
12k views

About the number format in ticks

I want to LogPlot a function, but I have the trouble in the number format in the ticks. For example, ...
24
votes
6answers
4k views

Annoying display truncation of numerical results

I have a lot of data to inspect. An example of a number in my program is 123.189094 This gets displayed as 123.189 ...
49
votes
4answers
1k views

How to create expanding summary boxes like the ones displayed for InterpolatingFunction, NearestFunction, etc.?

The display forms for objects like ClassifierFunction are nice clickable summary boxes I like this, and now I'm trying to create my a custom version of this for my ...
18
votes
5answers
631 views

Prevent graphics from rendering inside a held expression

Assuming each odd line is input I would like the even lines to be the output of the following lines. In the above the Graphics are inside ...
13
votes
6answers
12k views

How to export data files using specific number format

Very often, I have to export data files from Mathematica. These output files contain several columns and hundreds of lines with data. For the sake of the question let's create a sample list: ...
21
votes
3answers
3k views

Mathematica Sec and Csc

How can I prevent Mathematica from using the "old fashioned" functions "Sec" and "Csc"? In Germany these functions are "old fashioned" as they are not taught anymore at school.
18
votes
1answer
1k views

How to put terms in lexicographic order?

Is it possible to have terms like f[w-c] be formatted like this and not like f[-c + w]. I use Mathematica (7.0) for simplifying ...
18
votes
2answers
896 views

Notebook formatting - easier descriptions for equations and results?

When I do computations in mathematica, I generally try to make it readable for myself-in-the-future. This can be a cumbersome task in mathematica, where it often requires me to switch betwee a text ...
8
votes
2answers
687 views

Display Log with desired notation in output

I wish to display logarithms with different bases in the single-term rather than numerator/denominator form during output: ...
30
votes
5answers
13k views

Formatting a number with fixed number of significant digits

I need a formatting function (say format[x_, n_]) which outputs numbers with fixed n significant digits without unnecessary dot. ...
10
votes
2answers
1k views

Displaying index as subscript on output: e.g. C[i] -> C_i with Notation[…] or Interpretation[..]?

You have all convinced me not to type in formulas with subscripts. However, in order to be able to match the subscripts in my whiteboard math, I figure a 2nd best solution is to want to display ...
18
votes
4answers
2k views

How to keep Collect[] result in order?

For example, Collect[(1 + x + Cos[s] x^2)^3, x] gives the result ...
4
votes
2answers
3k views

I get weird <<…>> symbols in my output — what does it mean?

After I input the following: data = Table[{3 + i + RandomReal[{-3, 7}], i + RandomReal[{-2, 5}]}, {i, 1, 20}]; model = LinearModelFit[data, x, x] I got ...
33
votes
2answers
5k views

Way to improve “show me this decimal number to M places, don't use scientific notation”?

The best way I can come up with to say "show me this fraction as a decimal number to M places, don't use scientific notation" is: ...
9
votes
2answers
3k views

How do I set the fonts for Input and Output in my stylesheet?

I'd like to change the font that Mathematica uses for output by setting the font of the corresponding style in my stylesheet, but simply overriding the default ...
9
votes
4answers
464 views

Incompatibility of Row and TeXForm

Bug introduced in 9.0 and persisting through 11.0 Update: Since no one has been able to give a reason for this change in behavior or provide a solution I am tagging this as a bug. Please report it ...
31
votes
2answers
919 views

What are all the named Mathematica styles?

This question came to mind because of this answer to a recent question. Under Style, the Mathematica Documentation Center says the following about named styles. A few common named styles include:...
20
votes
2answers
4k views

Any way to make my equations look better, more Latex like?

I find that the equations I write in Mathematica are not always publication quality. Here is a typical example: If I copy as Latex, then I get the following code: ...
22
votes
4answers
2k views

Format and TeXForm does not work as expected

Recently, we had a nice question which brought up an issue that I believe is a bug. In the tutorial Defining Output Formats, there is an example at the end which doesn't make sense: This specifies ...
9
votes
3answers
1k views

How do I get a two-term polynomial with a leading negative sign to display in the correct (i.e. textbook) order?

The first three expressions evaluate as expected and the polynomial is displayed in what I would call "textbook" form. The last expression, however, switches the order of terms. Mathematica employs ...
9
votes
2answers
4k views

Formatting Ticks and FrameTicks labels with a function

Is there a convenient way to format tick labels? In this example I would like to use the default Mathematica tick intervals, but simply convert the X axis labels to strings with "s" added. As you ...
7
votes
1answer
828 views

How do I edit the background of Axis labels in my plot?

I'm using the standard report stylesheet in Mathematica and when I output a plot, I've set it up so that I get a white background, however the axis labels still have a gray background. How do I change ...
30
votes
5answers
21k views

Remove tick labels, but retain tick marks in RegionPlot (and related functions)

I would like to remove the numbering on the axes of the following RegionPlot. I would like to keep the tick marks but drop the numbering, I haven't figured out how ...
22
votes
4answers
5k views

Constructing a list that includes a leading zero (01,02,03 … 55, 56, etc.)

I am constructing a list for use in file operations. Say I want to create list which contains values from 01 to 87. The kicker is that the first nine integers need ...
20
votes
2answers
479 views

Understanding evaluation and typesetting

Background So, one could be surprised by the fact that: Hold @ Grid[{{1, 2}}] (*or*) Hold @ Graphics @ Disk[] This issue and methods of prevention are ...
7
votes
3answers
292 views

Wrapper for inexact numeric complex numbers that maintains polar form

Related question: How can I convert a complex number into an exponent form Mathematica insists on displaying complex number in form a+I b when ...
5
votes
3answers
504 views

How to change the color of specified digits in a number?

I've been playing with numerical approximations for irrational numbers, and would find it convenient to be able to highlight where these approximations deviate from the known correct answers. For ...
2
votes
1answer
509 views

Problem with using GraphicsColumn

I have three plots defined as: ...
8
votes
2answers
1k views

How to eliminate the zero real part of a purely imaginary number?

In Mathematica 9, a purely imaginary number, e.g. 0.9 I, will display as 0. + 0.9i in the output form. How can I eliminate the ...
25
votes
1answer
2k views

How can I make a notebook with two column layout?

How can I make a notebook with two column layout? Is it possible? I saw something tools could do such thing? Author Tools?
14
votes
1answer
759 views

Formatting Framed - some FrameStyle graphic directives don't work?

The FrameStyle option in Framed seems to work for some graphics directives but not others, eg: Framed["yo", FrameStyle -> Blue] But ...
10
votes
3answers
591 views

Inconsistent display of TraditionalForm in version 9

After installing version 9, the default style sheet uses Arial font in text and formula cells. So far, so bad. At least one would hope this is done consistently. But now I see this: You can see ...
10
votes
3answers
503 views

is it possible to change/customize some conversions done by TeXForm?

I use TeXForm to convert output of some computation to Latex. I'd like to ask if there is a way to override/change/customize some of these conversions, related to just the name Mathematica assigns to ...
10
votes
3answers
8k views

Replace very small numbers by zero in the output of a list

I have a long nested list, but many elements are numbers of order 10^-18 or less, e.g. ...
2
votes
1answer
559 views

How to apply multiple format to a list

I have a nested list like matrix = {{1.2345664, 2.38673956, 3.567846}, {0.00034554, 124.4554654, 6.34543}, {0.0000233, 244.34454, 2}} and I want to apply ...
2
votes
2answers
445 views

Lossless TIFF or PNG export

I'd like to export an output from MatrixPlot[], however, the output file size seems to depend on my specification of the ImageSize -> {..., ...}. How might I export a TIFF with all of the data in the ...
33
votes
8answers
2k views

How do I get my equation to have the form $(x-a)^2 + (y-b)^2 + (z-c)^2-d = 0$?

I want Mathematica to express the equation $$-11 - 2 x + x^2 - 4 y + y^2 - 6 z + z^2=0$$ in the form $$(x - 1)^2 + (y - 2)^2 + (z - 3)^2 - 25=0$$ How do I tell Mathematica to do that?
40
votes
7answers
2k views

Nice formatting for the results of a dice game simulation

One of my Mathematica interests is in problems related to the formatting of output. Getting nice formatting from Mathematica is often frustrating, but occasionally Mathematica will delight me by ...
5
votes
3answers
2k views

Simplify function notation

I have some calculations with arbitrary functions. In the output, Mathematica always shows the functions with its arguments. I would like to tidy the notation a bit, by hiding the arguments in the ...
25
votes
5answers
6k views

sprintf() or close equivalent, or re-implementation?

Is there a sprintf() command (some command that takes a printf-style format string and a list of values to insert into the ...
15
votes
3answers
1k views

TeXForm and large brackets (\Biggl[ etc)

Goal I am trying to export a very long expression like expr = c1*bracket1[a+b+c2*bracket2[d+e+f...]]+... to LaTeX using ...
16
votes
3answers
2k views

Why doesn't PlotMarker option None return no PlotMarkers?

After reading the PlotMarkers documentation it seems to be all or nothing. For example if you wanted markers on some of you lines the code below seems possible/...
15
votes
4answers
868 views

How can I turn off SingleLetterItalics in PlotLabel, etc, when the Options Inspector won't do it?

One of the requirements set for the graphing project I am working on is that plot and axis unit labels sometimes need to include superscripts. Here is an approximately minimal example (I have some ...
9
votes
3answers
355 views

Wrapping EventHandler by Table

I am making a grid on the screen. The grid is composed of different expressions. I want all of them to have a Gray background, which turns into a ...
11
votes
3answers
1k views

Expression of uncertainty in measurement.

I have a problem with writing a Mathematica function. I have been requested to show the results of my experiments with the measurement uncertainty (mu) like below: ...
11
votes
3answers
942 views

Vertical alignment of FrameTicks Text

The text box of a FrameTick/Tick is, by default, vertically centered on the tick mark. Is there a way to adjust the vertical alignment of FrameTick text? Specifically, along the lines of Baseline, ...
12
votes
3answers
2k views

Telling mathematica to output * instead of space for multiplication, so I can copy as plain text

I am trying to get some symbolic expressions in Mathematica which I would like to paste into my C/MATLAB codes. This can be accomplished nicely by selecting the expression and right-clicking to ...
7
votes
3answers
205 views

Why does TraditionalForm[Inactivate[x y]] show x * y ? instead of x y?

Given that both x and y are expressions, in my case x is ...