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.

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'...
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, ...
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 ...
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}}]}] ...
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 ...
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 ...
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, ...
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 ...
15
votes
3answers
254 views

How to specify custom graph styles for GraphStyle?

There is a way to specify custom themes for plots (Is it possible to define a new PlotTheme?), but themes do not apply to Graph objects, not even to ...
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 ...
13
votes
2answers
1k views

What is the precedence of FrameStyle, FrameTicksStyle, and LabelStyle? How to have a LabelStyle different from FrameStyle

From the documentation: Plot[2 Sin[x], {x, 0, 10}, Frame -> True, FrameLabel -> {x, y}, PlotLabel -> 2 Sin[x], LabelStyle -> Orange] But then add a ...
13
votes
1answer
168 views

How to retrieve current FaceForm?

The current colour in a Graphics object can be retrieved using CurrentValue["Color"] for use in Dynamic stuff. Example: ...
13
votes
2answers
302 views

What is the difference between Inherited and (Inherited + 0)

Let's create a stylesheet: ...
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: ...
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 ...
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., ...
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 ...
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 ...
10
votes
3answers
736 views

How to create parabolic mesh?

In general how can we create a figure like this?
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,...
9
votes
4answers
3k views

How can I create a help button that looks more “professional”?

My goal, is to make the following button, ...
9
votes
5answers
455 views

Replicating a PlotStyle from Trees, Maps, and Theorems

How might I make a plot with this style, where the callouts are on the side and the y-axes chopped off for a minimal look? Here's some example data with the callout that I'd like to add, but I'm not ...
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} ]
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 ...
9
votes
1answer
181 views

PlotMarkers shadows the settings by Style

The code below gives color-varying points with explicit Style wrappers: ...
9
votes
1answer
1k views

How to print $\odot$ without it being cropped? (\[CircleDot] symbol)

Preamble: In some applications (astronomy, cosmology, etc), it is useful to measure things in solar quantities, say distances in $R_\odot$ or masses in $M_\odot$, and so on. Now and then I see ...
9
votes
1answer
255 views

Why I cannot change the AxesStyle of the Plot?

Bug introduced in 8 or earlier and persists through 11.0.1 or later I am trying to plot the following single variable function: $$\small\frac{180 \sqrt{\pi ^2-625 t} \left(\pi ^2 (36 t-25)-1500 t \...
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 ...
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, ...
8
votes
1answer
100 views

How to add inner ticks to a PieChart?

I know how to add Callouts to the outside of a PieChart, but I would like to add inner ticks like this: Note the 3, 6, 9, 12 ...
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 ...
8
votes
1answer
73 views

Acessing style information of TimeObject and DateObject DisplayForm

The two functions TimeObject and DateObject (both introduced in version 10) feature neat ...
8
votes
1answer
342 views

Styling polar axes in PolarPlot

You can style the axes in Plot with AxesStyle. For example, the following code makes the axes red. ...
8
votes
1answer
132 views

Make polygons visible in MeshRegions in v11, as they were in v10

In versions 10.x, polygons in mesh regions were clearly outlines: In version 11.0 they aren't by default. How do I get back the v10 display so I can see where my polygons are, even in flat faces ...
8
votes
0answers
41 views

Styles inheritance stack for elements of a Graphics/GraphicsBox

You can skip to the bottom if you only care about the question. My original goal was to control FrameLabel color from a notebook level opposed to doing it ...
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 <...
7
votes
2answers
161 views

Styling Geo Primitives

How do you style the following: GeoGraphics[{Red, Opacity[1], GeoDisk[{60, 20}]}, GeoBackground -> None] so that the resulting disk is exactly red? ...
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: ...
7
votes
2answers
323 views

How to create the waved style for curves in Graphics?

There are the dashed and dotted styles for lines and circles when we plot them with Graphics....
7
votes
2answers
427 views

wolframscript — How to print in color

I want to print to the console in color from a wolframscript. I tried just using a Style: ...
7
votes
3answers
120 views

Change style of cell if group collapses?

Other than the GroupOpener triangle, are there anyways to change how a cell (that is the parent cell of a group) looks when its group is collapsed or expanded? Specifically, using the stylesheet ...
7
votes
1answer
165 views

How to list all styles for current notebook?

How can I programmatically list the available cell styles for the current notebook? I am looking for the same list displayed in the Format → Style menu (which I know is not the exhaustive list of ...
7
votes
1answer
104 views

How to control style of GeoScaleBar?

I'm plotting the GeoScaleBar over satellite image and wish it to be white but cannot find an option which controls its styling: ...
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 ...
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
4answers
731 views

3D scatter plot with crosses

I would like to do a 3D scatter plot with cross (x or +) markers instead of dots for each point. So far I'm using the following command: ...
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 ...
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?
6
votes
2answers
832 views

Awful styling in MMA10's Plot

Switching to MMA10, I'd want to produce a plot using this code: ...
6
votes
3answers
216 views

Syntax highlighting in text cells

I want to write some documentation for a notebook using text cells. Now, I can select parts of the text within such a text cell and set its style to "Input". This does change its font, but there is no ...