Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Plot rendering problem in linux

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48165] Plot rendering problem in linux
  • From: hmzppz at yahoo.com (Arsaces)
  • Date: Fri, 14 May 2004 20:59:43 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I had a problem rendering simple plots such as Plot[x,{x,0,10^10}] in
Mathematica 5.0.1 under Linux: the program simply hungs. I am using
RedHat 7.3, but the same problem was observed under Mandrake 9.2, as
was reported in this forum earlier. There was no fix to this problem
available on the net (even though Wolfram claims that it was resolved
in 5.0.1 -- not true), so I came up with this temporary (and not very
clean) fix (see below.)

The problem is traced back to the character "Multiply" (\264) in
Mathematica1Mono font, so I replace it with "Cross" (\211). In fact,
mathematica uses the old name Math1Mono for the font, but changing it
to Mathematica1Mono messes up with font metrics, somehow. But changing
to Mathematica1 works better.

Please let me know if someone has a better fix, even though this one
works fine for me

Thanks,
A.
-------------
Here are the instructions for the fix.


1) Save the following as fixgraphics.m in
$HOME/.Mathematica/Applications:

$DisplayFunctionFixed :=
  Module[{graphics = ToFileName[$TemporaryPrefix, "graphics.mps"],
        fixed = ToFileName[$TemporaryPrefix, "fixed.mps"],
        script =
          ToFileName[$UserAddOnsDirectory,
"Applications/fixgraphics.pl"]},
      Display[graphics, #];
      Run[script];
      Display[$Display, Import[fixed]];
      #] &
$DisplayFunction = $DisplayFunctionFixed

2) Add the following line to $HOME/.Mathematica/Kernel/init.m

Get["fixgraphics.m"]

3) Save the following as fixgraphics.pl in
$HOME/.Mathematica/Applications. You must have perl. Customize if
necessary


#!/usr/bin/perl
 
$tmp = "/tmp/m";
 
open($input, "<$tmp/graphics.mps");
open($output, ">$tmp/fixed.mps");
 
while ( <$input> )
{
$line = $_;
$line =~ s/^\(\\264\)/\(\\211\)/;
$line =~ s/Math1Mono/Mathematica1/g;
print $output "$line";
}
 
close($input);
close($output);


  • Prev by Date: Re: A special kind of partitions of an integer
  • Next by Date: RE: Re: Drawing a globe, with countries and great circle routes
  • Previous by thread: AppellF1 Question
  • Next by thread: Re: Plot rendering problem in linux