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

10
votes
2answers
366 views

Diagonal Tick Marks

I would like to draw diagonal tick marks around a plot, and simultaneously rotate the tick labels as well. I've mocked up what this would look like: Is there an easy way to do this in Mathematica? ...
10
votes
2answers
3k views

Use different ColorFunction for each function plotted

When plotting two curves on one plot, you can specify different colors for each function: Plot[{Sin@x, Cos@x}, {x, 0, 4π}, PlotStyle -> {Red, Blue}] To ...
10
votes
2answers
571 views

Detecting edge/region in contour plot

I am interested in improving this plot: which I produced with the following command: ...
9
votes
4answers
406 views

Graphics can't be live and editable

Is there a way to construct an interface so that the Code and the Graphics remain in sync? For example I would like to be able to drag/drop and move around different shapes in Graphic while seeing ...
9
votes
2answers
496 views

Automatizing PSfrag export

I'm in the early phase of creating a Mathematica function (or package) that exports graphics such that they can be used with $\LaTeX$'s PSfrag. The goal Ideally, the function should take a graphic ...
5
votes
1answer
307 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
616 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
378 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
986 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
332 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
237 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
259 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
685 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
282 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
345 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
365 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
120 views

How to fix a PDF line rendering problem in V9

If I run this in V8 ...
3
votes
2answers
231 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
442 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
794 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
577 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
353 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
340 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
448 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
537 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
578 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
383 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
252 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
160 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
540 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
608 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
209 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
379 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
273 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
506 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
181 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
449 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: ...