4
$\begingroup$

It seems that DateListPlot when used in webMathematica (3.3.1) show different output than in desktop Mathematica (10.1).

In desktop Mathematica, if you evalutate

data = {{{2015, 1}, 10}, {{2015, 2}, 6}, {{2015, 3}, 15}};
DateListPlot[data]

will show this picture:

desktop Mathematica output

in webMathematica instead, when you call this code (html removed for clarity) in .jsp file from your browser

<msp:evaluate>
      data = {{{2015, 1}, 10}, {{2015, 2}, 6}, {{2015, 3}, 15}};
      MSPShow[DateListPlot[data]]
</msp:evaluate>

it will show the graph without the vertical and horizontal Ticks:

webMathematica .jsp 1st output

Then I've tried to add FrameTicks -> True (and Frame-> False otherwise it doesn't show them)

<msp:evaluate>
      data = {{{2015, 1}, 10}, {{2015, 2}, 6}, {{2015, 3}, 15}};
      MSPShow[
         DateListPlot[data
           ,Frame-> False
           ,FrameTicks -> True]]
</msp:evaluate>

the output now shows the ticks but in Scientific Notation. No way to display the ticks in date format:

webMathematica .jsp 2nd output

It appears as a bug for me, because other functions as Plot[] or ListPlot[] produce a regular output. This strange behavior seems to be peculiar to DateListPlot[].

Does anyone has encountered the same problem or found a workaround?

(I've post this question also in the Wolfram Community Forum)

$\endgroup$
1
  • 1
    $\begingroup$ I am also affected by this but under the Wolfram Script environment instead of webMathematica. I added more info under your Wolfram Community post and also added a "bugs" tag because this has been reproduced by wolfram support [CASE:3450946] $\endgroup$ Oct 30, 2015 at 13:08

1 Answer 1

3
$\begingroup$

Works fine for me under Linux and Windows. Make sure you specified the right Kernel and FrontEnd in MSPConfiguration.xml. I.e., in Windows add this before </MSPConfiguration> in MSPConfiguration.xml

<KernelExecutable>
        C:\Program Files\Wolfram Research\Mathematica\10.1\MathKernel.exe
</KernelExecutable>

<FrontEndExecutable>
        C:\Program Files\Wolfram Research\Mathematica\10.1\Mathematica.exe
</FrontEndExecutable>

while under Linux I use:

<KernelExecutable>
      /usr/local/Wolfram/Mathematica/10.1/Executables/MathKernel
</KernelExecutable>

    <FrontEndExecutable>
          /usr/local/Wolfram/Mathematica/10.1/Executables/Mathematica
    </FrontEndExecutable>

     <JLinkNativeLibraryDirectory>
        /usr/local/Wolfram/Mathematica/10.1/SystemFiles/Links/JLink/SystemFiles/Libraries/Linux-x86-64
      </JLinkNativeLibraryDirectory>

    <FrontEndLaunchFlags>
    -display :1 -nogui -geometry 1920x1050+10+10
    </FrontEndLaunchFlags>

Also I use this (on Centos ) in /etc/init.d/tomcat:

#!/bin/sh
#chkconfig: 2345 95 20

CATALINA_HOME=/opt/tomcat; export CATALINA_HOME
JAVA_HOME=/usr/java/default; export JAVA_HOME
TOMCAT_OWNER=tomcat; export  TOMCAT_OWNER

start() {
  echo -n "Starting Tomcat:  "
  su - $TOMCAT_OWNER -c $CATALINA_HOME/bin/startup.sh

}
stop() {
   echo -n "Stopping Tomcat: "
   su - $TOMCAT_OWNER -c $CATALINA_HOME/bin/shutdown.sh
}

##

case "$1" in
    start)
      start
       ;;
    stop)
       stop
       ;;
    restart)
       stop
       start
       ;;
    *)
       echo $"Usage: tomcat {start|stop|restart}"
   exit
esac
$\endgroup$
5
  • $\begingroup$ Thank you Rolf, but on my Linux server the MSPConfiguration.xml has already a similar configuration (it differ only in the resolution of -geometry). The problem affect only DateListPlot so I don't think that can be a configuration problem. Do you use webMMA 3.3.1/Tomcat 8 /Java 1.8 on your Linux? $\endgroup$
    – Guido
    Jun 23, 2015 at 16:59
  • $\begingroup$ webMathematica 3.3.1 , Tomcat 8.0.23, Oracle Java 8.0.45 $\endgroup$ Jun 23, 2015 at 20:28
  • $\begingroup$ Same configuration: CentOS, Tomcat 8.023, JVM 1.8.0_45-b14, webMMA 3.3.1, MMA 10.1 $\endgroup$
    – Guido
    Jun 23, 2015 at 22:28
  • $\begingroup$ Rolf, please, can you tell me which version of webMathematica is displayed in the 'Manager App' page of Tomcat? I ask this because I've downloaded and installed v.3.3.1 (as it appear on the Wolfram download page), but in Tomcat it shows as 3.3.0. Maybe this is the glitch. $\endgroup$
    – Guido
    Jun 23, 2015 at 22:32
  • $\begingroup$ Indeed, it says 3.3.0. But this is because in web.xml it says so. Why don't you just contact Wolfram support? $\endgroup$ Jun 24, 2015 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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