0

Is there a way to do this in illustrator? I suppose so, but after many tries and Google searches couldn't find a way

enter image description here

Tha axes don't matter, just the Gaussian distribution (the "bell" so to speak)

1

Drawing it manually is a theoretical possibility. I wouldn't try it except in case some math program helps to draw the curves (see NOTE1). Tracing manually (=draw paths with the pen on a locked image) a screenshot or a PNG file which is got from elsewhere would be much easier. If you are lucky you can get it from elsewhere as vector. Then you only do only some cleanup and decoration in Illustrator.

Programmers who know the wanted math function, Illustrator scripting language and how to code drawing of 2D projections of 3D objects could write a script for the job, but that's out of the reach for most of us.

Copying it from elsewhere sounds attractive. Commercial math tools like MathCAD, Matlab or Mathematica cost some real money and they are much more powerful than what's needed for plotting your graph. Fortunately there exists some free online graph plotters which can make it. One example:

1https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/

enter image description here

I have suppressed showing axles and scale numbers to keep the image simpler. You can also select a single surface color if that's wanted.

The viewing direction is freely rotatable.

The plot can be printed as PDF if you have a PDF printer installed. The file can be opened in Illustrator. It's a vector.

The file is complex. Prepare to release and delete clipping masks and make several ungroupings before all parts are free for edits. You can for ex. select one black line segment, then select the same (=Select > Same > Stroke Color) and change all stroke widths and colors at the same time. As said, all surface facets can be set to have the same color, if wanted.

Knowing how to use Illustrator's Layers and Appearance panels to see the groups, clipping masks, paths, strokes and fills is essential! Without understanding them disassembling the PDF, removing extras and inserting your own decorations turns to a hopeless mess.

It's useful to know that behind the surface there's the rest of the wireframe. In the rightmost version of the next image all fill colors are removed in Illustrator:

enter image description here

It's very hard to remove hidden lines from the wireframe. Even the Shape Builder is hopeless because the high number of objects makes it very slow. It's best to fill the surface facets in the plotter program with white if you need a black wireframe on white. You cannot do it easily in Illustrator because the surface facets are different objects than the wireframe strokes.

If you need numbers or coordinate axles you have the best control if you insert them manually in Illustrator. Import 2 copies, one with the numbers and coordinate axles for reference.

Not asked: This plotter can also export as STL - with zero thickness or selected thickness. We do not explore it further except we recall that STL is triangle mesh surface. Here it's seen in a 3D program:

enter image description here

Search for online function plotters if you want more options. Geogebra looks promising but it wants login and account for advanced functions. Geogebra Classic can be used anonymously, but it has limitations and its 3D graph SVG export seems to make invalid vector files.

Spreadsheet programs like Excel can make 3D surface plots. The result is coarse. To hide it the plot uses wide lines. Some spreadsheets do not make lines, actually all line segments can be rectangles. Default settings generate obscure colors and you must enter the viewing angles numerically if the default view isn't ok.

The result can be copied & pasted to Illustrator, but there you'll meet numerous groupings, clipping masks and hundreds of splintered objects just like in the online plotter example.

Here's one example plot in legacy Excel which makes quite simple graphs:

enter image description here

Although its simpler than modern Excel plots, cleaning it in Illustrator needs much work, so it's best to define the plot as well as possible in the spreadsheet. But surprisingly it's very easy to trace manually, probably easier than trying to edit the pasted version. Only lock the pasted image, have Smart Guides and Snap to Point =ON and click with the Pen. Lock every drawn curve as soon as it's drawn to keep it in safe.

If you feel you could use advanced math software if you got it for free you can try Scilab https://www.scilab.org

It's actually a programming system for complex calculations like Matlab, but it's free and it can export editable vector graphs. That software IS complex, but surely it's much more than any graph plotter or spreadsheet. Using it properly unfortunately is beyond my skills.

NOTE1: Inkscape has a curve plotter extension which can draw the curves in XZ and YZ plane. Also Geogebra makes well 2D vector curves. They can be skewed and placed manually one by one for a 3D view. Actually only a quarter of the curves are needed because the rest can be mirrored. You can for ex. make a set like this

enter image description here

They are all 10(exp(-(x^2+N^2)/20)) where in every curve x walks from 0 to 10 and every curve has different N. The values of N are 0,1,2,3,4,5,6,7,8,9 and 10. The top blue curve has N=0. Black coordinate lines are inserted manually.

Skewing and placing these isn't especially difficult, but removing the invisible parts which should be behind the surface needs much tinkering. In the next image 25% of the curves are placed only to show what I mean. The black lines are useful as guides.

enter image description here

Save your nerves. Let a 3D graph plotter do the job and reduce the effort say 95%.

  • Graphing applications are plentiful, some cost money others don't. For example matplotlib is completely free and mostly exactly like matlab in plotting capability. Mathematica on the other hand is free if you run it on a raspberry pi for example. – joojaa Jan 10 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.