The following warnings occurred:
Warning [2] Trying to access array offset on value of type null - Line: 4475 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 4475 errorHandler->error
/inc/class_session.php 451 my_strlen
/inc/class_session.php 356 session->update_session
/inc/class_session.php 75 session->load_guest
/global.php 55 session->init
/showthread.php 22 require_once
Warning [2] Trying to access array offset on value of type null - Line: 1229 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1229 errorHandler->error
/showthread.php 110 forum_permissions
Warning [2] Trying to access array offset on value of type null - Line: 1229 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1229 errorHandler->error
/showthread.php 110 forum_permissions
Warning [2] Trying to access array offset on value of type null - Line: 1237 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1237 errorHandler->error
/inc/functions.php 2318 forum_permissions
/showthread.php 577 build_forum_jump
Warning [2] Undefined array key "threadread" - Line: 1773 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1773 errorHandler->error
/inc/functions_indicators.php 42 my_set_array_cookie
/showthread.php 585 mark_thread_read
Warning [2] Undefined array key "forumread" - Line: 77 - File: inc/functions_indicators.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions_indicators.php 77 errorHandler->error
/inc/functions_indicators.php 45 fetch_unread_count
/showthread.php 585 mark_thread_read
Warning [2] Undefined array key "forumread" - Line: 1773 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1773 errorHandler->error
/inc/functions_indicators.php 218 my_set_array_cookie
/inc/functions_indicators.php 48 mark_forum_read
/showthread.php 585 mark_thread_read
Warning [2] Undefined array key "warninglevel" - Line: 5 - File: inc/functions_post.php(410) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(410) : eval()'d code 5 errorHandler->error
/inc/functions_post.php 410 eval
/showthread.php 994 build_postbit
Warning [2] Undefined array key 0 - Line: 1023 - File: inc/class_parser.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_parser.php 1023 errorHandler->error
/inc/class_parser.php 1041 postParser->mycode_parse_img
[PHP]   postParser->mycode_parse_img_callback1
/inc/class_parser.php 392 preg_replace_callback
/inc/class_parser.php 155 postParser->parse_mycode
/inc/functions_post.php 582 postParser->parse_message
/showthread.php 994 build_postbit
Warning [2] Undefined variable $css_align - Line: 1029 - File: inc/class_parser.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_parser.php 1029 errorHandler->error
/inc/class_parser.php 1041 postParser->mycode_parse_img
[PHP]   postParser->mycode_parse_img_callback1
/inc/class_parser.php 392 preg_replace_callback
/inc/class_parser.php 155 postParser->parse_mycode
/inc/functions_post.php 582 postParser->parse_message
/showthread.php 994 build_postbit
Warning [2] Undefined array key "button_pm" - Line: 57 - File: inc/functions_post.php(657) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(657) : eval()'d code 57 errorHandler->error
/inc/functions_post.php 657 eval
/showthread.php 994 build_postbit
Warning [2] Undefined array key "button_multiquote" - Line: 59 - File: inc/functions_post.php(657) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(657) : eval()'d code 59 errorHandler->error
/inc/functions_post.php 657 eval
/showthread.php 994 build_postbit
Warning [2] Undefined array key "" - Line: 2442 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 2442 errorHandler->error
/inc/functions_post.php 414 format_name
/showthread.php 994 build_postbit
Warning [2] Trying to access array offset on value of type null - Line: 2443 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 2443 errorHandler->error
/inc/functions_post.php 414 format_name
/showthread.php 994 build_postbit
Warning [2] Undefined array key "avatar_padding" - Line: 19 - File: inc/functions_post.php(657) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(657) : eval()'d code 19 errorHandler->error
/inc/functions_post.php 657 eval
/showthread.php 994 build_postbit
Warning [2] Undefined array key "useravatar" - Line: 20 - File: inc/functions_post.php(657) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(657) : eval()'d code 20 errorHandler->error
/inc/functions_post.php 657 eval
/showthread.php 994 build_postbit
Warning [2] Undefined array key "userstars" - Line: 26 - File: inc/functions_post.php(657) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(657) : eval()'d code 26 errorHandler->error
/inc/functions_post.php 657 eval
/showthread.php 994 build_postbit
Warning [2] Undefined array key "button_multiquote" - Line: 59 - File: inc/functions_post.php(657) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/functions_post.php(657) : eval()'d code 59 errorHandler->error
/inc/functions_post.php 657 eval
/showthread.php 994 build_postbit
Warning [2] Undefined variable $moderationoptions - Line: 70 - File: showthread.php(1286) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/showthread.php(1286) : eval()'d code 70 errorHandler->error
/showthread.php 1286 eval





Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insufficient accuracy on tick mark labels on HPlot
09-11-2015, 03:33 AM
Post: #1
Insufficient accuracy on tick mark labels on HPlot
Please excuse formatting blunders, its the first time I use this forum.

The small Java example code below produces a large number of points of a sinusoidal function, stores them in a P1D and that gets displayed via an HPlot.

If you zoom on the horizontal axis into the area beyond 1E6 until you see only a few oscillations you will notice that the tick mark labels on the horizontal axis all show the same number and the axis gets automatically labelled with a scale factor of 10^6. (see the attached picture) I.e. there is not sufficient accuracy to display the tickmarks once the numbers are displayed in scientific or exponential notation.

Could somebody tell me how I can increase the accuracy (number of significant digits) of axis tick mark labels in an HPlot ?

regards
Armin

Code:
package plotproblemdemo;

import jhplot.HPlot;
import jhplot.P1D;

public class PlotProblemDemo {

    public static void main(String[] args) {
        // TODO code application logic here
        String p1DName = "My p1D";
        P1D myP1D = new P1D(p1DName);
        myP1D.setLineStyle(1);
        myP1D.setDrawSymbol(false);
        double start = 0;
        double end = 2000000;
        double period = 100;
        double amplitude = 1;
        double y;
        for (double x = start; x <= end; x+=10) {
            y = amplitude * Math.sin(x/period);
            myP1D.add(x, y);
        }
        int width = 900;
        int height = 500;
        String hPlotName = "My HPlot";
        HPlot myHPlot = new HPlot(hPlotName, width, height, 1, 1);
        myHPlot.setRangeX(start, end);
        myHPlot.setRangeY(-(amplitude*1.1),+(amplitude*1.1));
        myHPlot.visible();
        myHPlot.draw(myP1D);
    }
}

[Image: HPlotTickLabelProblem.pdf]
Find all posts by this user
Quote this message in a reply
09-12-2015, 09:01 AM
Post: #2
RE: Insufficient accuracy on tick mark labels on HPlot
Hello, Armin

It is usually not recommended to use HPlot when the number of points is so large, since the canvas requires to much memory. Try to use SPlot or HPlotXY.
This example seems works:

Code:
from jhplot import *
from java.lang  import Math

p1DName = "My p1D";
myP1D = P1D(p1DName);
myP1D.setLineStyle(1);
myP1D.setDrawSymbol(False);
start = 0;
end = 2000000;
period = 100;
amplitude = 1;

for x in range(start,end,10):
            y = amplitude * Math.sin(x/period)
            myP1D.add(x, y)
width = 900;
height = 500;
hPlotName = "My HPlot";
# myHPlot = HPlotXY(hPlotName, width, height);
myHPlot = SPlot(hPlotName, width, height);
myHPlot.visible();
myHPlot.setRange(start, end, -(amplitude*1.1), +(amplitude*1.1));
myHPlot.draw(myP1D);
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)