可以试试luadraw宏包:
当然,这需要手动安装,也需要lualatex。
如果要画的函数没有简单的极坐标公式的话,这种方式可能是最具有拓展性的。
\documentclass[border=4pt]{standalone}
\usepackage{luadraw}
\begin{document}
\begin{luadraw}{name=implicit_function}
local g = graph:new{window={-3,3,0,2},size={10,10}}
g:Linecap("round")
g:Saveattr(); g:Viewport(-2.5,-.5,0,2); g:Coordsystem(-2,2,-2,2,true)
local F = function(x,y) return (x^2+y^2)^2 - 2 * 4 * x * y end
g:Dimplicit(F,{grid={500,500},draw_options="thick"})
g:Daxes(
{0,2.5,2.5},{arrows="-latex",legend={"$x$","$y$"},labelpos={"top","right"},originpos={"none","none"}}
)
g:Restoreattr()
g:Saveattr(); g:Viewport(2.5,0,0,2); g:Coordsystem(-2.5,2.5,-2,2,true)
local G = function(x,y) return (x^2+y^2)^2 - 4 * (x^2 - y^2) end
g:Dimplicit(G,{grid={500,500},draw_options="thick"})
g:Daxes(
{0,3,3},{arrows="-latex",legend={"$x$","$y$"},labelpos={"top","right"},originpos={"none","none"}}
)
g:Restoreattr()
g:Show()
\end{luadraw}
\end{document} 

























问 如何画伯努利双纽线?