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.

Filter by
Sorted by
Tagged with
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'...
62
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
906 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
3k views

Thickness of logarithmic tick marks

Bug introduced in 8 or earlier and persisting through 12.0 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 the ...
21
votes
1answer
2k 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 ...
17
votes
3answers
774 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
482 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
269 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
484 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
460 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 ...
13
votes
1answer
173 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
309 views

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

Let's create a stylesheet: ...
12
votes
1answer
646 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
579 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
274 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
223 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
759 views

How to create parabolic mesh?

In general how can we create a figure like this?
10
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 ...
10
votes
1answer
179 views

How to emulate LaTeX Theorem environment with a Mathematica Style?

( This has probably been asked before, but I found no Q/A's ) ( Update: Changed Title 28/6 ) Mathematica has the Style 'DisplayFormulaNumbered', I want to find / create something like 'TextNumbered' (...
10
votes
1answer
299 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
474 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
501 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
637 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
2answers
415 views

Styling polar axes in PolarPlot

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

PlotMarkers shadows the settings by Style

The code below gives color-varying points with explicit Style wrappers: ...
9
votes
1answer
291 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
187 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
107 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
139 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
81 views

Acessing style information of TimeObject and DateObject DisplayForm

The two functions TimeObject and DateObject (both introduced in version 10) feature neat ...
8
votes
2answers
660 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: ...
8
votes
1answer
69 views

How to fine tune the style of IntervalMarkers -> “Bands”?

In Mathematica 12 I can use ListPlot to visualize uncertainty of tabulated data as bands. For example: ...
8
votes
1answer
134 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
45 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
86 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
183 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
164 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
438 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
1answer
193 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
3answers
136 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
2answers
102 views

Maintaining correct spacing around operators

How can I create mathematical expressions (just for the looks) which have correct spacing around the operator? I want to use display these in arbitrary places, such as labels in a GUI, tick labels or ...
7
votes
1answer
119 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
148 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
752 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
604 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 ...