I have created the following package.

AplicacionCartesiana::usage = "AplicacionCartesiana[f, {x0, x1, dx}, \
{y0, y1, dy}] plots the image of the Cartesian coordinates under the \
complex function f."
AplicacionCartesiana[func_, {x0_, x1_, dx_}, {y0_, y1_, dy_}] :=
 Module[{xy, x, y, hg, vg},
  xy = func[x + I y];
  hg = Curves[xy, {x, x0, x1, dx}, {y, y0, y1}];
  vg = Curves[xy, {y, y0, y1, dy}, {x, x0, x1}];
  Show[Graphics[Join[hg, vg]],
   AspectRatio -> Automatic,
   Axes -> True]
Curves[xy_, spread_, bounds_] :=
 With[{curves = Table[{Re[xy], Im[xy]}, spread]},
  ParametricPlot[curves, bounds, DisplayFunction -> Identity][[1]]

But I want to know where I have to store it in my computer in order to use it (with Get[] or Needs[]) in other mathematica session. Thanks.

  • 3
    $\begingroup$ You can always use Get[] to load your package from an arbitrary path, e.g. Get["/path/to/AplicacionCartesiana.m"]. $\endgroup$ – J. M.'s torpor Nov 15 '19 at 3:47

You should put it in this folder:

FileNameJoin[{$UserBaseDirectory, "Applications"}]

Packages that you put there will also be automatically available when a new version of Mathematica is installed.

You can also install packages from the File menu, File -> Install. It will place the file in the same folder as mentioned above, as I recall (it's been a while.)


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