Questions on the construction of 2D and 3D graphics through the direct use of primitives, directives, and functions. Include the graphics3d tag for questions specifically on 3D graphics. This tag is not to be used for basic questions on visualizing functions and lists using the various flavors of ...

learn more… | top users | synonyms

5
votes
1answer
306 views

Label area on plot

I created the following plot using Mathematica: ...
17
votes
2answers
359 views

Packed Graph or GraphPlot output with non-square layout?

Graph or GraphPlot produce square layouts for disconnected graphs: Graph[Table[i -> Mod[i^3, 100], {i, 1, 100}]] I´d like to get a rectangular layout with ...
16
votes
1answer
612 views

How can I share objects with dynamic content with non-Mathematica users?

Often when I construct some cool Manipulate[] function, I would like to share it with others—non-Mathematica users. Some software, notably Cinderella, ...
13
votes
4answers
377 views

How to separate paths from the output of EdgeDetect?

I have been trying to find a way to separate the various closed paths that can be output by EdgeDetect. For example, taking the output of: ...
12
votes
3answers
976 views

Adapt ticks in plot and font in legend

Some of my 2-dimensional data are displayed with a code similar to this: ...
12
votes
4answers
331 views

Arranging connector lines

Heike gave an absolutely wonderful answer to my question about arranging subplots around a main plot and including connector lines. This is the result: Starting from Heike's answer, what is the ...
10
votes
2answers
236 views

Encoding format used by GraphicsData?

I am trying to extract some graphics stored in PICT format from a Mathematica notebook, using a platform that doesn't support PICT. If I look at the .nb file in a ...
9
votes
2answers
254 views

Is there a way to programmatically set global preferences?

Can I set global preferences that are accessible via "Edit"->"Preferences" programmatically from within a notebook? As learned from this question, turning off anti-aliasing can make a huge difference ...
9
votes
2answers
677 views

Preventing label crowding in PieChart RadialCallout and RadialCenter

Is it possible to avoid this unreadable situation with label crowding when using PieChart's RadialCallout and ...
8
votes
2answers
311 views

How to draw a contour diagram in Mathematica?

This answer at Math.SE contains a neat contour diagram created using Mathematica: What Mathematica functions I can use to draw diagrams like this?
7
votes
1answer
281 views

Accidentally corrupted graphics (?) data of notebook — now it won't open

In the process of editing my scripts' variable names with a haphazard "replace in all open files" in my text editor, I accidentally replaced portions of graphics data in a notebook (and I believe this ...
7
votes
1answer
308 views

Combining graphics

Original question I would like to put a coloured grid behind the following plot: which was generated by: ...
7
votes
1answer
344 views

How to get full-screen graphics canvas?

Is it possible to create a full-screen graphics without any front end elements like cell brackets and scrollbars? The zero approximation can be ...
7
votes
3answers
1k views

How to make a tight crop of a 3d plot?

I like Mathematica, but it's syntax baffles me. I am trying to figure out how to minimize the whitespace around a graphic. For example, ...
6
votes
1answer
362 views

How do I constrain the region where I can drag a Locator?

How do I constrain the region where I can drag a Locator to conform to rules, including rules that apply to computations resulting from the value of the ...
5
votes
0answers
119 views

How to fix a PDF line rendering problem in V9

If I run this in V8 ...
3
votes
2answers
230 views

How can Magnify be forced to ignore the notebook's window width?

In a new notebook, I can illustrate how the action of Magnify is cut off by the window width: ...
16
votes
5answers
1k views

How can I create a rectangular graphic with curved edges?

I want to make some button shaped graphics that would essentially be a rectangular shape with curved edges. In the example below I have used Polygon rather than ...
15
votes
5answers
2k views

How do I draw a triangle given the lengths of the sides?

I know, of course, how to draw a triangle in the plane given the vertices: Graphics[Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]] But I'm not sure how to simply draw ...
13
votes
1answer
243 views

How to determine numeric equivalent of Tiny, Small, etc. image sizes for Graphics?

Is there a way to find the numeric equivalents of Tiny, Small, Medium, and ...
13
votes
2answers
51k views

Generate a Unit Circle Trigonometry

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :
11
votes
3answers
436 views

WaveletScalogram in polar coordinates

For given dataset data = Re[Zeta[1/2 + I Range[0, 100, 0.01]]]; It is nice that Mathematica can plot data in both Cartesian and Polar coordinates. ...
11
votes
3answers
2k views

Poor rendering of fractals

Could someone explain why I get those ugly graphics .. ..trying to use fractals in mathematica 8 ? I'd also like to know if it is possible to draw 2D fractals in Mathematica My configuration ...
10
votes
5answers
793 views

The mysterious gap inside Grid

There's this gap inside Grid which I cannot seem to remove. Perhaps someone knows how. ...
9
votes
2answers
570 views

Customize your FrameTicks in a MATLAB way

The figure below is made by MATLAB. However, the scientific form of numbers in FrameTicks that how MATLAB deals with is quite different from that of Mathematica. ...
9
votes
2answers
305 views

Transition between graphs

I want to visually demonstrate the manipulations made to a graph. For instance, I have a graph g where using the command ...
8
votes
1answer
248 views

How to compile Heike's winding number function?

Heike gave the following function for winding number: ...
8
votes
1answer
352 views

Way to find color at a point in a Graphics?

I need to figure out a way to find out the RGB color value at a certain coordinate in a Graphics object. The Graphics object I am dealing with is continually Dynamically updated, so it is made of ...
7
votes
3answers
337 views

Identifying when two graphic objects overlap

I'm designing a small demonstration that helps to visualize the reason behind shaping an electrode that is used to probe a surface: ...
7
votes
4answers
446 views

Mark an 2d-area on a 3dPlot (ListPlot3d)

I have a list {(IC,s,FK)}, which I use to generate a 3d-plot with the help of the command ListPlot3D. ...
7
votes
3answers
534 views

How to get rid of Panel margins?

I have a feeling that there is something wrong in general with Mathematica's way of dealing with margins and spaces among/around objects in Graphics, ...
6
votes
1answer
570 views

How do I prevent fonts sizes and line weights from scaling in exported graphics?

It's common to export graphics from Mathematica that are subsequently scaled to various sizes that cannot (at least not conveniently) be anticipated. This is problematic in cases where (as is common) ...
6
votes
2answers
171 views

Control which variables get embedded inside Manipulate

While trying to analyse several different datasets I got what I thought was a good idea: define a "function" that returns a Manipulate object. But this has some ...
5
votes
1answer
380 views

How to display each step of an A star algorithm?

I wrote a pathfinding program: A*, which is an extension of Dijkstra. I want to see the result of each step at a time. Which function should I use? The main program is the notebook Astar, which is ...
5
votes
3answers
249 views

How to disable differential styles/markers/etc. for multiple entities?

For functions that can produce multiple "style-able" entities, Mathematica by default will give each such entity a different style. Similar conventions apply to other features, either by default, or ...
5
votes
1answer
140 views

How to make MousePosition more reliable

This takes a little patience to reproduce, but I got a screenshot of it in version 9 on Mac OS X 10.7.5: With a small Graphics object, it occasionally happens that ...
4
votes
2answers
159 views

Grid ItemSize is smaller than expected

If I execute MatrixPlot@IdentityMatrix@100, the result is a good size. However, if I evaluate ...
4
votes
1answer
535 views

Plotting a 2D shape along a 3D parametric function curve

Say I have a 3D curve that is parametrically defined. How would I be able to plot shapes like figure 8s whose centers are aligned along the 3D curve? Say the curve was: ...
4
votes
1answer
605 views

Removing clipping masks from exported PDFs

I usually export graphics from Mathematica as PDFs which I tweak with Adobe Illustrator. When most plots are exported from Mathematica as PDFs they contain a large number of mostly useless clipping ...
3
votes
1answer
206 views

ImageSize as absolute (metric) value

I have wondered more and more often lately how the size of an image is handled when displayed or exported. The documentation implies that the via ImageSize the ...
3
votes
1answer
375 views

Exporting a Video of a Simulation of Pendulum Motion

In a series of previous questions, I asked how to solve a series of differential equations describing a series of coupled pendulums, and then how to plot this data by coloring the different pendulums. ...
2
votes
2answers
267 views

How can I build a GraphicsGrid of arbitrary size?

This is actually a very simple scenario, in order to make simpler this question Part I. Consider the following piece of Mathematica code ...
1
vote
2answers
496 views

How can I get even steps on x and y axes in a plot?

I'm plotting the shortest distance from a point to a line using the following code ...
0
votes
1answer
178 views

How can I build a GraphicsGrid of fixed size that rearranges the empty plots?

OK, let's make one final attempt; they say the third time is the lucky one! Following @rm-rf 's suggestions, I will try to be as clear as I can. My Mathematica code reads and plots simultaneously ...
19
votes
1answer
446 views

What is wrong with triangle PlotMarkers in v.10.0.0?

In Mathematica 10.0.0 we have built-in graphical triangle PlotMarkers. Let us look closer on them: ...
19
votes
7answers
2k views

How do you draw the plane on which two vectors lie?

Given two arbitrary vectors $\textbf{v}_1$ and $\textbf{v}_2$, how can I draw the plane which they span?
13
votes
4answers
1k views

How can I extract the maximum value from a Histogram?

In Mathematica 8.04 I've created a histogram of returns on a stock using: ...
11
votes
1answer
352 views

Map of Specific US States? (Isolated)

My question here is fairly basic, and I'm sure I'm overlooking something basic. I know about CountryData for creating shapes of entire countries, and it works, to ...
11
votes
2answers
661 views

Why is ListDensityPlot unable to plot datasets with extreme ranges

Consider the following dataset: data = Flatten[ Table[{x 10^-9, y 10^-9, x^2 + y^2},{x, -100, 100, 10}, {y, -100,100, 10}] , 1]; If I try to ...
10
votes
6answers
1k views

2D Gaussian distribution of squares coordinates

I would like to imitate the structure of this great painting from Ellsworth Kelly in Mathematica. Yet with all the colored squares in Black and the beige one in white. Below is what I have wrote to ...