Questions tagged [output-formatting]

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

1,175 questions
Filter by
Sorted by
Tagged with
31 views

MatrixForm a product of matrices [closed]

I was hoping that MatrixForm[SingularValueDecomposition[{{1, 2}, {3, 4}}] ] would neatly display the singular value decomposition of a matrix in the form of a ...
94 views

Format table output

I'm trying to make a quick code to give me coordinates of some circles to be read in AUTOCAD. When I use the format "Table" or ...
41 views

remove one of the column in the output of Solve command

I would like to remove one variable in the output of the "Solve" command without changing the rest. For instance, in the following code ...
49 views

StringTemplate with Irrational number

How to keep irrational number as their original form rather than approximation when using StringTemplate? StringTemplate["1"][Sqrt[3]] This will output ...
79 views

How to preserve multirows when exporting TableForm results?

I've created a table of data in Mathematica with a list of values with each data point. So for example, I have the following dummy data: ...
189 views

Extract outputs from a WHILE loop in a table format

How can I convert my multiple outputs of a while loop in a table form and save it for later use. Here is a sample code: ...
99 views

Why does Factor[] not factor -1?

Consider the two expressions -2a-2b and -a-b. The TreeForm[] looks identical However, ...
66 views

What do indices in brackets mean? [closed]

Solving the Schrodinger equation for a free particle gives me this output: What does the $\psi^{(2,0)}$ mean here?
25 views

Alignment when not dealing with (just) text [duplicate]

In designing interfaces for dynamic operation, I am finding that I cannot figure out how to get alignment to work. For example: ...
116 views

Changing the format string for numeric floating point values in the Put function

In my current macro, I have: Put[Chop[someList], "someFile"]; where "someList" is a mixed bag of "strings", "integers", "exact complex values" (e.g. ...
1k views

How to get Planck length in meters to 6 decimal places

I want Mathematica to format quantities to more decimal places than the default. For example I have tried ...
67 views

PageWidth not inserting line breaks into long strings

I am having some trouble setting the width of my output. I have some very long expressions, and I would like to output them as strings of maximum length 80 characters. For example, I have a very long ...
79 views

Alignment on character that has an overscript

We can align to a character: ...
61 views

WriteLine[] not working once put into a function

I wrote a function that takes two strings, an integer, and an OutputStream, it's supposed to write to. The function is: ...
104 views

Displaying the repeating decimal expansion of a rational number [duplicate]

How do I write a decimal expansion of a rational number $a/b$ with only periodic part, e.g., given $1/7=0.14285714285714285714 \ldots$, I want just $0.142857$, the periodic part of $1/7$, to be ...
220 views

Align y-Axes in Overlay plot

I learned about how to plot two datasets in a single plot with two y-axes by using Overlay as has been done in one of the answers in this question. Now, my ...
173 views

What's the difference between 56 and Integer[56]? [duplicate]

I'm trying to grasp how to Wolfram Language uses symbolic expressions for everything. The concept of doing so makes sense to me, but the language doesn't behave how I predict. I understand how ...
82 views

How to decorate data in a matrix for reporting purposes?

I want to create a report from two matrices m1 and m2 (already created, and available) with data. The report should (roughly) look like the output of the following code: ...
315 views

How to make version 12 print Root objects to screen normally as in earlier versions?

From clean kernel, when typing result = Reduce[2 d^2 == -((2*(1 + d) + ((4 d^3)/(1 - d)))*(d - 1)),d] Here what version 12 displays on the screen, compared to ...
104 views

Appending functions to list

Help me please. My task is to determine the sequence of polynomials $(s,s',..,-rem(fs_{k-1},s_{k}),...,constant)$ and create an array in which I will record the value of the members of this sequence ...
67 views

Augment Export function to support custom number formatting

It's a shame that the Export framework provides no support for custom formatting of real numbers. Is it possible to augment the framework so that a "NumberForm" ...
122 views

How can I pair the values in 2 different tables of the same length together to make a table with 2 variables {x, y}?

I have 2 tables, the first called GenotypesMaleUp ...
97 views

Can I store output data in the Notebook file? Specifically output from NDSolve[ ]

I am having some outputs from NDSolve of the form {{x→InterpolatingFunction[…], y→InterpolatingFunction, … }} and the ...
51 views

Hide details of ParametricFunction

I use ParametricNDSolve to return a particular combination of the (vector) variables, at the end of the integration range. This gives a ...
103 views

How to Print["x=",x] with Style? [closed]

How to Print a text and a value with the same Style?, for example {Bold, Blue, 22} a=4 Style["The number is ", a , Blue, 22] ...
187 views

How can I generate this exact table?

The TableForm[] is a trig table which shows sine, cosine and tangent values for integer angles from 0 degrees to 90 degrees in steps of 3 degrees. I want to recreate the exact same table using ...
59 views

Using StringTemplate with TableForm [closed]

I have a table given by ...
58 views

Changing the layout of an array in output

I'm curious about the following: if I want to make a table described by the following code, ...
803 views

How do I display multiple objects on one output line?

I am using WriteString to avoid automatic line change. But it seems like the it does not work with Style, like the following <...
101 views

Line breaks in Print and PutAppend

This is probably a simple-minded question, but I've tried many things that haven't worked. In the output below, how does one add a line break before "points=..."? It will also need to work in ...
271 views

How can I save values generated by a Manipulate expression to a CSV file?

I have trouble generating and saving data from a manipulation that determines parameters. Can someone please help me? Manipulate[Plot[{func,x}, {x, 0, 3}] I ...
75 views

String with numbers output formating [closed]

Is there something similar to print("blah blah is %d", 5) in python? In order to print "blah blah is 5"?
89 views

Conditional formatting of table

I have a table (from this question) as follows: ...
59 views

Problem with multi-columns using Grid

I am working on a data table, ...
102 views

How can I arrange the factors in the order I prefer when using Collect function factor a polynomial?

I input in mathematica a*b*c*h and get the output as a b c h Now if I want to factor out 'b' and 'c' at the same time and ...
58 views

Require an expression to be formatted as an exponential expression

How can I require Mathematica to format an expression like Exp[x] x^s as Exp[x + s Log[x]]?
65 views

Highlight certain values based on position

How to highlight or color certain values in a list based on position.. For example x = {1,2,3,4,5,5,5,6}... I want to plot x and highlight values (Red) in a position such as {0,4,5} and others should ...
63 views

Making a plot label containing dynamically subscripted symbols [closed]

Manipulate[ Plot.... Epilog -> {Text["Al" <> ToString[x]<>"Ga" <> ToString[1 - x] <> "As", {0.5, 2}]}], {x, 0, 1}] But I ...
38 views

Is there an option to set fractional tick lables in linear form?

I want to set the fractional tick lables in linear form like this: And it can be done by use Row in each label, but it's boring. ...
118 views

No dividing lines for headers in TableForm

I seem to get this a lot, but I still can't find a systematic answer... The latest table I'm having trouble with is ...
114 views

How to export parameters in a text file?

I have some parameters defined in my notebook as, for example, a=1; b=2; c=3; and I want to export these parameters to a .txt file in which I have the following ...
57 views

Locate all row and column pairs containing a value in a table

I would like to find all row and column pairs that contain 1 in a table. For example, the row and column pairs that contain 1 in the table are (a,b),(b,a),(b,c),(c,b),(c,d),(d,c),(d,e),and (e,d). <...
322 views

How to substitute curly brackets with round brackets in a grid of list

I want to produce a table (or a grid) from my list of data, as follows: ...
203 views

Why do I get badly formatted numerical results when I use StringForm?

The following example prints the square and cube of numbers from 0.5 to 6 ...
82 views

How to get rid of some meshes in ListDensityPlot

I have some data that needs to be represented using the function ListDensityPlot, for example : ...
145 views

Using the top left corner of TableForm->TableHeadings

In the following Table TableForm[{{1, 0}, {0, 1}}, TableHeadings -> {{"x<=0", "x>0"}, {"y<=0", "y>0"}}] I ...
68 views

Show tabulated equations in matrix form [closed]

How do i put last equation, eqm[x, t, k, n] into matrix form? I want every row to end with == 0 ...
141 views

Generate a "real time" table of data from an animation

I have a basic animation of a parametric plot: ...