Assume that we are given a symbol p={x,y}
which should represent a 2D point. If x
and y
have numerical values then we can plot the point uisng
Graphics[Point[p]]
Next, I wanted to plot some setting for various x
and y
, so I thought I could use the With
command and have something like:
With[{x = 1, y = 1},
Graphics[Point[p]]
]
This doesn't work. I guess it has something to do with the order of evaluations, holding stuff etc. but I cannot figure out how to solve this.
So the question is how to use With
together with Graphics
?
p
as in my real example the definition ofp
depends onx
andy
in a somewhat more complicated manner. $\endgroup$p
as a function of the various symbols that define it? $\endgroup$