New answers tagged

6 votes

Tomographic Reconstruction of a Convex Polyhedron from its Orthographic Projections

We only need the data of the boundary points of the projections. ...
cvgmt's user avatar
  • 61.4k
3 votes

Tomographic Reconstruction of a Convex Polyhedron from its Orthographic Projections

Try ...
Ulrich Neumann's user avatar
2 votes

Getting Area from GeoGraphics

First I get just the image of the area with a 10 km scale bar: ...
ydd's user avatar
  • 2,654
1 vote

ListPlot with Opacity strange outcome

This bug for MacOS seems to have persisted in all recent versions except for 12.3.1 (cf the comments to the OP). I've reported it to Mma. For now they advise a way around the problem that does indeed ...
Jules Lamers's user avatar
  • 1,064
0 votes

How to Add Inner Squares to Bar Chart Using BarChart[] Function?

...
kglr's user avatar
  • 378k
3 votes

How to Add Inner Squares to Bar Chart Using BarChart[] Function?

1. ChartElementFunction We can use a custom ChartElementFunction to add lines to rectangles: ...
kglr's user avatar
  • 378k
2 votes

Visualization of two nearly identical datasets of 2D points

Plotting the data points over a background that highlights the differences: ...
vindobona's user avatar
  • 671
3 votes

Visualization of two nearly identical datasets of 2D points

It depends little bit what you want to stress. I personally like if some quantitative information can be obtained from the graph. Therefore I suggest a minimalistic approach that emphasises large ...
yarchik's user avatar
  • 17.5k
2 votes

Visualization of two nearly identical datasets of 2D points

To see the differences between two point sets we can also use DistanceMatrix dmat = DistanceMatrix[a, b]; The default distance function of ...
eldo's user avatar
  • 40.6k
4 votes

Visualization of two nearly identical datasets of 2D points

We use the points a to construct a region Point[a]. We use RegionNearest to find the nearest ...
cvgmt's user avatar
  • 61.4k
4 votes
Accepted

Visualization of two nearly identical datasets of 2D points

Because in your case there is: 1-to-1 point correspondence In[]:= Length/@{a,b} Out[]= {205,205} almost exact overlap which is much smaller in magnitude than ...
Vitaliy Kaurov's user avatar
3 votes

Visualization of two nearly identical datasets of 2D points

One way to show the difference is to plot vectors. Their length and color show the differencse: ...
Daniel Huber's user avatar
  • 45.4k
2 votes

Visualization of two nearly identical datasets of 2D points

Another possibility? ListPolarPlot[{a,-b},PlotStyle->PointSize[Large]]
user1066's user avatar
  • 14.4k
7 votes

Visualization of two nearly identical datasets of 2D points

One of many styling possibilities ListPlot[{a, b}, ImageSize -> Large, PlotStyle -> {Directive[PointSize[0.02], Lighter @ Gray], Red}]
eldo's user avatar
  • 40.6k
2 votes

Visualization of two nearly identical datasets of 2D points

Just guessing that maybe an animation might be helpful... ...
JimB's user avatar
  • 39.6k
2 votes
Accepted

How to make a PlotMarker with two colors?

You may draw a marker consisting of 2 half disks with the corresponding colors: ...
Daniel Huber's user avatar
  • 45.4k
3 votes

How to make a PlotMarker with two colors?

Here's an attempt using the PolygonMarkers resource function. The hfm function is adapted from the Neat Examples section of the documentation of that resource ...
MarcoB's user avatar
  • 65.3k
3 votes

How to make a PlotMarker with two colors?

A possibility could be: ...
Syed's user avatar
  • 38k
6 votes

Code golf chromostereopsis illusion

Just another variation using GaussianMatrix: Image@Map[{#,0,1-3#}Sign[#-3Sign@#]&[⌊2Random[]⌋⌊10^4#⌋]&,GaussianMatrix[{28,21}],{2}] 86 Characters ..
vindobona's user avatar
  • 671
3 votes
Accepted

How to match sizes of objects among several Graphics outputs?

o1 = Disk[#] & /@ {{0, 0}, {8, 2}}; o2 = Disk[#] & /@ {{0, 0}, {5, 0}}; You can use the still-undocumented form ...
kglr's user avatar
  • 378k
1 vote

Summate opacity for AnglePath

A decent result can be achieved with simple code using VertexColors although there is still a little overlap at each hinge of the path. ...
azerbajdzan's user avatar
  • 7,094
6 votes

How to combine plots together and add legends inside the frame?

You can eliminate a lot of redundant code by using a single Plot ...
Bob Hanlon's user avatar
  • 149k
4 votes

Summate opacity for AnglePath

For an example, we first create a path: SeedRandom[1]; path = AnglePath[RandomChoice[Pi {1/2, -1/2}, 100]] // Round; Then we create the different lines of this ...
Daniel Huber's user avatar
  • 45.4k
3 votes
Accepted

Summate opacity for AnglePath

Unfortunately all answers are either limited or give unnecessary artefacts. So I did it myself. Prepare process: ...
lesobrod's user avatar
  • 1,085
0 votes

How to ensure that Polygon[list] plots a simple polygon?

Based on 195229, the points can be sorted to create a convex polygon. As a demonstration and comparison with ConvexHullMesh: ...
Syed's user avatar
  • 38k
2 votes

Cut out circle out of circle

...
Syed's user avatar
  • 38k
2 votes

Code golf chromostereopsis illusion

n = 57; RandomInteger[1, {n, n}] (#[22, n] - 2 #[16, n] + 2) &@DiskMatrix // ArrayPlot[#, ColorRules -> {2 -> Blue, 0 -> Black, 1 -> Red}] & ...
Syed's user avatar
  • 38k
7 votes

Code golf chromostereopsis illusion

74 characters, incorporating Adam's method for rounding: If[#<.45(r=⌊2Random[]⌋),Red,If[r#>.54,Blue,Black]]&~RadialGradientImage~57 Old versions: 77 ...
Greg Hurst's user avatar
  • 35.2k
10 votes
Accepted

Code golf chromostereopsis illusion

66 characters, adapted from Greg Hurst's answer: Hue[2⌊2#⌋/3,1,⌊2Random[]⌋Boole@¬.44<#<.53]&~RadialGradientImage~57 old versions 79: ...
Adam's user avatar
  • 3,797
2 votes

Using GraphicsGrid for density plots with color scales

Graphics and Inset give you more control, e.g. ...
Chris Degnen's user avatar
  • 30.6k
5 votes

Code golf chromostereopsis illusion

Shortening Melago's method to 87 characters: ArrayPlot@ Array[RandomChoice@{1, If[# . # < 300, Red, If[# . # < 440, 1, Blue]]&@{##}}&, {57,57}, -28] ...
kglr's user avatar
  • 378k
8 votes

Code golf chromostereopsis illusion

The symbol is equivalent to -> and works well when you copy & paste the code from here to Mathematica. Code length is ...
azerbajdzan's user avatar
  • 7,094
9 votes

Code golf chromostereopsis illusion

92 characters if colors are controllable: w=49;Image[RandomInteger[1,{w,w}](1-16~#~w+2 12~#~w)/.{0->Black,1->Blue,2->Red}]&@DiskMatrix 86 characters ...
Silvia's user avatar
  • 27.3k
6 votes

Code golf chromostereopsis illusion

Not fewer characters, but just for fun: 125 characters ...
MelaGo's user avatar
  • 6,841
5 votes

Code golf chromostereopsis illusion

94 characters: ArrayPlot@ Array[RandomChoice[{t = #^2 + #2^2; If[t < 300, Red, If[t >= 440, Blue, Black]], 1}] &, {57, 57}, -28]
MelaGo's user avatar
  • 6,841
11 votes

Code golf chromostereopsis illusion

84 characters: ...
kglr's user avatar
  • 378k
9 votes

Code golf chromostereopsis illusion

115 characters (or 110, see below): ...
Roman's user avatar
  • 44.9k
4 votes

How to make the same color scale range for all plots?

$Version (* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *) Clear["Global`*"] f[r_, B_, z_] := B*(r^2 + z^2)*Sin[z]^2; Determine the ...
Bob Hanlon's user avatar
  • 149k
5 votes
Accepted

How to make the same color scale range for all plots?

Perhaps something like this? You just need to define the ColorFunction and set ColorFunctionScaling to ...
ydd's user avatar
  • 2,654
1 vote

PlotStyle function for elegant graphics

...
Bob Hanlon's user avatar
  • 149k
8 votes

PlotStyle function for elegant graphics

...
eldo's user avatar
  • 40.6k
2 votes

Point Belonging to a Disk in a Cartesian Coordinate System

Using Outer and RegionMember: ...
Syed's user avatar
  • 38k
1 vote

How to make a density plot for an isotropic function written in cylindrical coordinates?

You just need to define the function you want and use one of the following Mathematica functions. If I understand what you are asking for ...
Athanasios Paraskevopoulos's user avatar
3 votes

How to achieve gradient color for a shape?

Since V 12.2 there is LinearGradientFilling: Graphics[{LinearGradientFilling[{White, Red}], Rectangle[{0, 0}, {1, 1}]}]
eldo's user avatar
  • 40.6k
1 vote
Accepted

How to Control Tick Precision in ListLinePlot?

To control the number of decimal places displayed on the horizontal and vertical axes in a ListLinePlot or any other plot in Mathematica, you can use the ...
Athanasios Paraskevopoulos's user avatar
1 vote

How to Control Tick Precision in ListLinePlot?

Use pairs of values and print formats eg ...
Roland F's user avatar
  • 2,244
1 vote

Change in graphic style - ConvexHull

...
Syed's user avatar
  • 38k
1 vote

Adding a coordinate label to individual squares in ArrayPlot[...]

...
kglr's user avatar
  • 378k
2 votes

Adding a coordinate label to individual squares in ArrayPlot[...]

Using MapIndexed: ...
Syed's user avatar
  • 38k
1 vote

How to fill with color the space between plotted points?

...
Bob Hanlon's user avatar
  • 149k

Top 50 recent answers are included