Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [style]

Questions about applying a consistent look or form to Mathematica output, including use of the built-in styling constructs (Style, PlotStyle, etc). For questions specific to styling in notebooks with stylesheet properties please use the [stylesheet] tag.

44
votes
4answers
8k views

How to change the default ColorData used in Mathematica's Plot?

This question leads on from the recent question What are the standard colors for plots in Mathematica? There it was determined that the default color palette used by ...
9
votes
3answers
583 views

Set the style of a cell

I know it's possible to programmatically change options on the selection in a notebook. I'd like to create a button that lets me change the style of a cell. It's a style that doesn't have a keyboard ...
18
votes
1answer
2k views

Thickness of logarithmic tick marks

Bug introduced in 8 or earlier and persisting through 11.1.1 I'm trying to plot a graph wit a logarithmic y-axis. Since I'm exporting the graph to pdf and later printing it, I want to manually set ...
11
votes
1answer
361 views

Graph: Coloring parallel edges individually

CODE: Graph[{Style[0 -> 1, Red], Style[0 -> 1, {Blue, Dashed}]}] This Mathematica code will make both lines solid Red, since they belong to the same two ...
63
votes
2answers
1k views

Guidelines for planning custom GUI in Mathematica

This post is here to save your time during GUI development in Mathematica. And one way to do this is to know where limits are and to be aware of features that are awaiting. Background Usually I don'...
5
votes
2answers
291 views

Syntax highlighting conflict

I'm trying to syntax highlight this expression: x=$\sqrt{\pi }$//N and from various sources I've learned that x (the assigned symbol) belongs to context Global while the Pi and N belongs to System. So ...
12
votes
1answer
589 views

How to make PlotMarkers constructed from Graphics track plot style?

In this plot the Disk[] markers are not colored according to the style of the line to which they belong: ...
61
votes
3answers
5k views

Python-style plots in Mathematica

I love making plots in Mathematica. And I love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, Mathematica can make very beautiful images, ...
9
votes
1answer
1k views

Solarized stylesheet and other goodies. Feedback welcome!

I was inspired by this post so I've made a Solarized stylesheet after mucking around with the text options and asking stupid questions on here. I know you can change the syntax highlighting by running ...
17
votes
3answers
722 views

Highlighting pattern strings in a large text

I would like to apply Style to strings that are matched, for example, with one or more specified patterns or regular expressions, a string or a list of both, ...
5
votes
1answer
155 views

Possible to include additional styles in context menu?

I am using Mathematica 9 on Windows 8, and I regularly want to use cell styles such as Section, SubSection and so on. If I click the + button before creating a new ...
11
votes
1answer
200 views

Creating version specific notebook styles: decide based on whether version is at least 11.1

I am trying to clean up the appearance of user-generated documentation in 11.1. I believe in some cases I need to set options based on the front end version: use one value for 10.0-11.0 and a ...
11
votes
1answer
267 views

Is there a way to base one style on another?

I'm setting up a stylesheet and and finding the process of defining related styles tedious and error prone. In particular, I have several related styles that need to have synchronized settings (e.g., ...
5
votes
0answers
169 views

How to prevent formatting as Mathematica code in inline cells?

We can start a new inline cell using Insert → Typesetting → Start Inline Cell. This is often used to insert mathematical formulae in text cells. Instead, I want to use it to insert small bits of non-...
6
votes
2answers
832 views

Awful styling in MMA10's Plot

Switching to MMA10, I'd want to produce a plot using this code: ...
5
votes
1answer
129 views

Updating styles which are based on styles changed in private stylesheet

Intro Styles can inherit from other styles: base one style on another? And for example WolframAlphaLong is inheriting from ...
11
votes
2answers
486 views

What are the default Frame / Axes styles and how can I find them?

I'm sure this must have been asked before but I am unable to find anything here on SE or on Google in general. I simply want to know what the default color and thickness are for a ...
15
votes
6answers
477 views

Different results between V9 and V10 when using Style with Listplot

Consider this example: data = Table[{x, x^2}, {x, -2, 2, 0.1}]; ListPlot[Style[{#1, #2}, PointSize[Abs[#2]/50], Hue[#2]] & @@@ data] the results from V9 and ...
6
votes
5answers
569 views

Colouring points in a Delaunay Mesh by the number of nearest neighbours

I apologise if this is a repeated question, but I've searched for a while and can't find anything. I'm doing some molecular dynamics simulations using Mathematica 10, and I've placed a ...
4
votes
1answer
116 views

How to use an ExpressionCell to display e.g. an Input cell inside a generated output?

It's not that I can't live with that but I don't understand why e.g: ExpressionCell[ Defer @ Style["string", Red], "Input"] is not showing quote marks? This ...
9
votes
1answer
181 views

PlotMarkers shadows the settings by Style

The code below gives color-varying points with explicit Style wrappers: ...
7
votes
0answers
135 views

How to change the style of part of a cell in 11.2?

In Mathematica 11.1 and earlier it was possible to select just part of the text in a cell, and apply a different style to it using Format → Style. For example, we could type "One two three four" in a ...
6
votes
1answer
938 views

How to use an image as a plot background

Is it possible to use an image as a plot background?
0
votes
3answers
260 views

Changing error bars color

I have the following plot ...
6
votes
1answer
103 views

Preserving changed Output style

Let's say I have a stylesheet with two slightly different "Output" and "Output2" styles. ...
4
votes
2answers
235 views
4
votes
1answer
170 views

Differently colored edges of same direction in a graph?

When I try to color edges in a graph that point to different vertices, it works properly: Graph[{Style[DirectedEdge[1, 2], Red], Style[DirectedEdge[2, 3], Blue]}] ...
4
votes
2answers
188 views

Headings, subheadings, text cells etc and Alt+n

This is a minor point but annoying. I have just upgraded to version 10.0.2.0 and discovered that you must select a bracket before doing Alt+1, or Alt +7 to make a cell a heading or text cell. This was ...
3
votes
3answers
255 views

PlotRange precision limit?

I'm trying to plot a set of points with 9 digits precision with a properly range labelling Y-axis, from a previous question I got two possible ways of doing this: 1st: suggested by @Carl Woll Using ...
21
votes
1answer
1k views

How to strip all formatting from a string and convert it to plain text?

The documentation on String states: But if I try to perform some manipulations on this string, for example, take 2 words from the left, I get some shards of ...
22
votes
1answer
862 views

How to write Morse code into Plot Dashing?

How can we define a dashing pattern in a plot such that it reads arbitrary text in Morse code? For instance Graphics[{DotDashed, Line[{{0, 0}, {5, 0}}]}] ...
15
votes
1answer
435 views

Accessing figure style (oldstyle or lining) of TrueType fonts

Most professional fonts come with at least two figure styles: old style (or text) figures and lining figures. In plots and most other figures I prefer to use lining figures. This is no problem with ...
10
votes
1answer
285 views

Automatic generation of cell tags

A similar question has been asked before, with no answers. I would love to have a way to easily reference objects associated with counters. To provide such a capability for things like figures, tables,...
7
votes
1answer
1k views

How to change frame size, while maintaining ImageSize? [duplicate]

I'm trying to come up with a MWE: anyData = Range[10]; Column@Table[ListLinePlot[n*anyData, Frame -> True], {n, {-1, 1}}] The lateral size of the plotframe ...
3
votes
1answer
2k views

How to change the default font for all cells in all notebooks [duplicate]

I am new to Mathematica. Currently I am using Mathematica 10 on Mac Yosemite. I have tried: Edit the default.nb and core.nb ...
8
votes
0answers
81 views

How to trace the stylesheet directives responsible for the selected text's appearance?

By way of example, in a typical Mathematica interactive session, one sees text content as shown below: Three different text styles can be seen in this figure: input, output, and the style for the <...
8
votes
2answers
126 views

Better aesthetics for graph vertices?

This is a follow-up question to: Unable to export a formatted graph? I trying to layout a graph so that if you zoom in on a vertex, things look nice. To see what I mean by nice, let me just describe ...
7
votes
2answers
170 views

Weighted graph with multiple different coloured non-weighted paths - styling

This follows on from my previous question answered here. Ultimately, I now have a graph which I've simplified for posting here: ...
4
votes
3answers
101 views

How can I set the style of one Output cell so it doesn't change after re-evaluating its Input cell?

I have created a notebook for my classes which is full of inputs that need to be evaluated by my students. All these inputs produce standard outputs, which are fine as they are. But there is one of ...
3
votes
1answer
76 views

Questions about InlineCell vs InlineFormula vs DisplayFormula cells

I'm having trouble with typesetting, and can't get these questions straight in my head. What is the difference between "InlineCell" and ...
9
votes
3answers
499 views

Small circles at mesh nodes

How to show the (16 X 4) mesh intersection points by a tiny red dots? ParametricPlot[v { Cos[u], Sin[u]}, {u, 0, 2 Pi},{v,1,3}, Mesh-> {15,3} ]
8
votes
1answer
175 views

Style in Graphics or Graphics3D?

To generate a yellow sphere, I usually write the code without using Style: Graphics3D[{Yellow, Sphere[]}] However, ...
6
votes
2answers
265 views

Limited styles in the Monochrome plot theme

It seems like PlotTheme -> "Monochrome" produces up to 8 different dashing styles for Plot. I know one way to overcome this ...
4
votes
2answers
354 views

Labeling vertices by number in Graph: Getting text to display at the right size

Minor aesthetic question here. I was playing around with Graph's and decided to render a cute-looking family of directed graphs, with the vertices being the number ...
4
votes
3answers
404 views

Using different style on segments of a plot [duplicate]

Is it possible to plot a function with two different colors? To illustrate, let's have: Plot[Sin[x], {x, 0, 2 π}] which plots a curve. And I would like it to be ...
4
votes
0answers
101 views

Are there any rules about style inheritance in Mathematica?

I can style every part of an UI separately. But it is not handy and it would be nice to have list of Heads which are not inheriting at all or even partly. Are there any rules about inheritance? <...
3
votes
1answer
899 views

How to enter chemical equations?

When I want to take chemistry notes and write down a formula such as H_2O or C_2H_5OH it enters "Math mode" which changes the font size and italicizes the letters. Is there an easy way to properly ...
2
votes
1answer
198 views

How to control size of self loops in Graph?

Is there a way to control the size of self loops when rendering a Graph? Example: ...
0
votes
1answer
67 views

How to assign arbitrary values to frameaxis of a ListDensityPlot

Maybe the question is stupid or already has been asked, however, I cannot find an answer while searching Q&A. Assume you have a Table[x*y,{x,1,4},{y,1,4}] ...
0
votes
1answer
75 views

What is the problem with the “|” character inside of strings?

When the "|" character appears inside of a string containing linear box syntax, SyntaxQ returns ...