You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows it's common that paths contain backslashes (although forward slashes are also supported in many places). However, when I pass a path to a save_to_ function that contains backslashes, I get the following error:
gnuplot> set output "Z:\temp\out\energy\energy3d_test\plot.pdf"
^
line 0: cannot open file; output not changed
system error: Invalid argument
Currently, I use the following workaround in my code
let output_file = output_path.join("plot.pdf");ifcfg!(windows){// On Windows, gnuplot doesn't accept any backslashes in the pathlet output_file = output_file.to_str().unwrap().replace("\\","/");
fg.save_to_pdf(&output_file,12,8).unwrap();}else{
fg.save_to_pdf(&output_file,12,8).unwrap();}
Either the backslashes have to be somehow escaped when passing them to the gnuplot executable or it doesn't support backslashes in the path at all. In any case, I think this should be handled by this library and not by user code. Unfortunately I don't have time at the moment to investigate this further.
The text was updated successfully, but these errors were encountered:
On Windows it's common that paths contain backslashes (although forward slashes are also supported in many places). However, when I pass a path to a
save_to_
function that contains backslashes, I get the following error:Currently, I use the following workaround in my code
Either the backslashes have to be somehow escaped when passing them to the gnuplot executable or it doesn't support backslashes in the path at all. In any case, I think this should be handled by this library and not by user code. Unfortunately I don't have time at the moment to investigate this further.
The text was updated successfully, but these errors were encountered: