diff --git a/graphics/CMakeLists.txt b/graphics/CMakeLists.txt index 0e109172e3..45eb1f16e7 100644 --- a/graphics/CMakeLists.txt +++ b/graphics/CMakeLists.txt @@ -4,18 +4,18 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) # Folders for generated files set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(JSON_PRO_DIR ${BUILD_DIR}/json_pro) -set(SVG_PRO_DIR ${BUILD_DIR}/svg_pro) +set(NEW_SVG_PRO_DIR ${BUILD_DIR}/new_svg_pro) set(OLD_SVG_PRO_DIR ${BUILD_DIR}/old_svg_pro) set(PDF_PRO_DIR ${BUILD_DIR}/pdf_pro) # Create the generated directory file(MAKE_DIRECTORY ${JSON_PRO_DIR}) -file(MAKE_DIRECTORY ${SVG_PRO_DIR}) +file(MAKE_DIRECTORY ${NEW_SVG_PRO_DIR}) file(MAKE_DIRECTORY ${OLD_SVG_PRO_DIR}) file(MAKE_DIRECTORY ${PDF_PRO_DIR}) # Decompress and copy over all references -foreach(FOLDER json_ref old_svg_ref pdf_ref svg_ref) +foreach(FOLDER json_ref old_svg_ref pdf_ref new_svg_ref) file(GLOB ARCHIVES ${FOLDER}/*zip ) foreach(ARCHIVE ${ARCHIVES} ) file(ARCHIVE_EXTRACT INPUT ${ARCHIVE} DESTINATION ${FOLDER}) @@ -179,7 +179,7 @@ foreach(TEST_DESCRIPTION ${TEST_DESCRIPTIONS}) # EXEC node Test_JsRoot.js ${macro} ${BUILD_DIR}) elseif(${test_type} STREQUAL "a") - foreach (X "j" "o" "p") + foreach (X "j" "o" "p" "s") ROOTTEST_ADD_TEST(${macro}_${X} MACRO testGraphics.C MACROARG \"${macro}\",\"${X}\",\"${macro_folder}\",\"${BUILD_DIR}\") diff --git a/graphics/README.md b/graphics/README.md new file mode 100644 index 0000000000..a379ef86ff --- /dev/null +++ b/graphics/README.md @@ -0,0 +1,51 @@ +# Recipe for Generating New Reference Files +This guide will help you update and generate new reference JSON, SVG and PDF files required for testing and debugging. Follow the steps below to ensure you are working with the most recent reference files. + +IMPORTANT: Reference JSON's are used to generate new SVG's (headless chrome browser). It is important to debug always both test and in case of a need of new references files to generate new ones for both. Therefore it is necessary to first update the json files and then the new svg files. + +## 1. Setting up +### 1. Create and Prepare Directories +Start by creating a directory for testing and cloning the necessary repositories. + + mkdir myTesting + cd myTesting + git clone https://github.com/root-project/root.git + git clone https://github.com/root-project/roottest.git + +### 2. Build Configuration +Create a build directory, configure the build to include testing and roottest options, and build the project. + + mkdir build + cd build + cmake -Dtesting=ON -Droottest=ON ../root + cmake --build . -j8 + +## 2. Running Tests +To update or debug tests, run the specific tests you are interested in. Replace macroname and testtype with the actual names used in your tests. + + ctest -R roottest-graphics-macroname_testtype + +## 3. Updating Reference Files +### 1. Navigate to the Generated Files Directory +Change to the directory where the new reference files are located. Replace folder_pro with the actual folder name. + + cd /path/to/build/roottest/graphics/folder_pro + +### 2. Move and Rename Files +Move and rename the files from the _pro suffix to the appropriate reference folder. Replace folder_ref with the actual folder name. + + for file in *_pro*; do + mv "$file" "/path/to/roottest/graphics/folder_ref/${file/_pro/}"; + done + +### 3. Zip the Updated Reference Files +Change to the reference folder and compress the updated files into zip archives. + + cd /path/to/roottest/graphics/ref_folder + ls *.fileformat | awk '{print "zip -m " $1 ".zip " $1}' | sh (replace fileformat) + +Replace fileformat with the actual file extension of your reference files (e.g., svg, pdf, json). + + + + \ No newline at end of file diff --git a/graphics/Test_JsRoot.js b/graphics/Test_JsRoot.js deleted file mode 100644 index d21b389cf3..0000000000 --- a/graphics/Test_JsRoot.js +++ /dev/null @@ -1,110 +0,0 @@ -//IMPORTS -const rootSys = process.env.ROOTSYS; -const path_jsroot = `${rootSys}/js/modules/main.mjs`; -const { version, parse, makeSVG } = await import(path_jsroot); - -import { promises as fs } from 'fs'; -import path from 'path'; -import xmlParser from 'xml-parser-xo'; -import chalk from 'chalk'; - -// JSROOT version -console.log(chalk.blue(`JSROOT version ${version}`)); - -//FUNCTIONS -async function compareSVG(svgPro, svgRef, baseName, svgRefPath) { - try { - const parsedProSVG = xmlParser(svgPro); - const parsedRefSVG = xmlParser(svgRef); - - if (JSON.stringify(parsedProSVG) === JSON.stringify(parsedRefSVG)) { - console.log(chalk.green(`MATCH: ${baseName} - Lengths [Pro: ${svgPro.length}, Ref: ${svgRef.length}]`)); - return true; - } else { - console.error(chalk.red(`DIFF: ${baseName} - Lengths [Pro: ${svgPro.length}, Ref: ${svgRef.length}]`)); - // Overwrite the reference SVG file with the produced one - await fs.writeFile(svgRefPath, svgPro); - await console.log(chalk.yellow("Reference SVG file updated")); - throw error; - } - } catch (error) { - throw error; - } -} -//Creates an SVG from a JSON file. -async function createSVGFromJSON(filePath, builddir) { - const baseName = path.basename(filePath, path.extname(filePath)); - const svgRefPath = `./svg_ref/${baseName}.svg`; - const svgProPath = builddir + `/svg_pro/${baseName}_pro.svg`; - - try { - // Read and parse JSON data - const jsonData = await fs.readFile(filePath, 'utf8'); - const data = JSON.parse(jsonData); - - // Create SVG from parsed data - let obj = parse(data); - let svgPro = await makeSVG({ object: obj, option: 'lego2,pal50', width: 1200, height: 800 }); - - try { - // Check if reference SVG file exists - await fs.access(svgRefPath); - const svgRef = await fs.readFile(svgRefPath, 'utf8'); - - // Save the produced SVG file - await fs.writeFile(svgProPath, svgPro); - - // Compare the produced SVG with the reference SVG - compareSVG(svgPro, svgRef, baseName, svgRefPath); - return true; - - } catch (error) { - // Reference file does not exist, create a new one - if (error.code === 'ENOENT') { - await fs.writeFile(svgRefPath, svgPro); - console.log("Create a new reference file"); - return false; - } else { - console.error(chalk.red('Error accessing or reading the reference SVG file:'), error); - return false; - } - } - } catch (error) { - console.error(chalk.red('Failed to process JSON file or create SVG:'), error); - return false; - } -} - -/** - * Main function to run the tests. - */ -async function main() { - const macro = process.argv[2]; - if (!macro) { - console.error(chalk.red('No macro specified')); - process.exit(1); - } - const builddir = process.argv[3]; - if (!macro) { - console.error(chalk.red('No builddir specified')); - process.exit(1); - } - - const jsonFilePath = `./json_ref/${macro}.json`; - try { - const success = await createSVGFromJSON(jsonFilePath, builddir); - if (!success) { - process.exit(1); - } - } catch (error) { - console.error(chalk.red('Error in main function:'), error); - process.exit(1); - } -} - - -// Run the main function -main().catch(error => { - console.error(chalk.red('Error in main function:'), error); - process.exit(1); -}); \ No newline at end of file diff --git a/graphics/new_svg_ref/analyze.svg.zip b/graphics/new_svg_ref/analyze.svg.zip new file mode 100644 index 0000000000..f4b11c81dd Binary files /dev/null and b/graphics/new_svg_ref/analyze.svg.zip differ diff --git a/graphics/new_svg_ref/annotation3d.svg.zip b/graphics/new_svg_ref/annotation3d.svg.zip new file mode 100644 index 0000000000..e189a21aad Binary files /dev/null and b/graphics/new_svg_ref/annotation3d.svg.zip differ diff --git a/graphics/new_svg_ref/approx.svg.zip b/graphics/new_svg_ref/approx.svg.zip new file mode 100644 index 0000000000..372fd20381 Binary files /dev/null and b/graphics/new_svg_ref/approx.svg.zip differ diff --git a/graphics/new_svg_ref/archi.svg.zip b/graphics/new_svg_ref/archi.svg.zip new file mode 100644 index 0000000000..0b211a76e6 Binary files /dev/null and b/graphics/new_svg_ref/archi.svg.zip differ diff --git a/graphics/new_svg_ref/arrows.svg.zip b/graphics/new_svg_ref/arrows.svg.zip new file mode 100644 index 0000000000..6218596f91 Binary files /dev/null and b/graphics/new_svg_ref/arrows.svg.zip differ diff --git a/graphics/new_svg_ref/atlasexample.svg.zip b/graphics/new_svg_ref/atlasexample.svg.zip new file mode 100644 index 0000000000..f0b0e0c011 Binary files /dev/null and b/graphics/new_svg_ref/atlasexample.svg.zip differ diff --git a/graphics/new_svg_ref/basic3d.svg.zip b/graphics/new_svg_ref/basic3d.svg.zip new file mode 100644 index 0000000000..941a70c3ac Binary files /dev/null and b/graphics/new_svg_ref/basic3d.svg.zip differ diff --git a/graphics/new_svg_ref/breitwigner.svg.zip b/graphics/new_svg_ref/breitwigner.svg.zip new file mode 100644 index 0000000000..093248dc57 Binary files /dev/null and b/graphics/new_svg_ref/breitwigner.svg.zip differ diff --git a/graphics/new_svg_ref/candledecay.svg.zip b/graphics/new_svg_ref/candledecay.svg.zip new file mode 100644 index 0000000000..bde686d64d Binary files /dev/null and b/graphics/new_svg_ref/candledecay.svg.zip differ diff --git a/graphics/new_svg_ref/candleplot.svg.zip b/graphics/new_svg_ref/candleplot.svg.zip new file mode 100644 index 0000000000..2035623272 Binary files /dev/null and b/graphics/new_svg_ref/candleplot.svg.zip differ diff --git a/graphics/new_svg_ref/candleplotstack.svg.zip b/graphics/new_svg_ref/candleplotstack.svg.zip new file mode 100644 index 0000000000..2ed8652336 Binary files /dev/null and b/graphics/new_svg_ref/candleplotstack.svg.zip differ diff --git a/graphics/new_svg_ref/candleplotwhiskers.svg.zip b/graphics/new_svg_ref/candleplotwhiskers.svg.zip new file mode 100644 index 0000000000..a600193b01 Binary files /dev/null and b/graphics/new_svg_ref/candleplotwhiskers.svg.zip differ diff --git a/graphics/new_svg_ref/candlescaled.svg.zip b/graphics/new_svg_ref/candlescaled.svg.zip new file mode 100644 index 0000000000..2e58e883ab Binary files /dev/null and b/graphics/new_svg_ref/candlescaled.svg.zip differ diff --git a/graphics/new_svg_ref/canvas.svg.zip b/graphics/new_svg_ref/canvas.svg.zip new file mode 100644 index 0000000000..9f0e735099 Binary files /dev/null and b/graphics/new_svg_ref/canvas.svg.zip differ diff --git a/graphics/new_svg_ref/chi2test.svg.zip b/graphics/new_svg_ref/chi2test.svg.zip new file mode 100644 index 0000000000..75552418e7 Binary files /dev/null and b/graphics/new_svg_ref/chi2test.svg.zip differ diff --git a/graphics/new_svg_ref/compile.svg.zip b/graphics/new_svg_ref/compile.svg.zip new file mode 100644 index 0000000000..772511b595 Binary files /dev/null and b/graphics/new_svg_ref/compile.svg.zip differ diff --git a/graphics/new_svg_ref/crown.svg.zip b/graphics/new_svg_ref/crown.svg.zip new file mode 100644 index 0000000000..be4ce17977 Binary files /dev/null and b/graphics/new_svg_ref/crown.svg.zip differ diff --git a/graphics/new_svg_ref/crystalball.svg.zip b/graphics/new_svg_ref/crystalball.svg.zip new file mode 100644 index 0000000000..d9c0ed7afe Binary files /dev/null and b/graphics/new_svg_ref/crystalball.svg.zip differ diff --git a/graphics/new_svg_ref/dynamicslice.svg.zip b/graphics/new_svg_ref/dynamicslice.svg.zip new file mode 100644 index 0000000000..dfcaddb66d Binary files /dev/null and b/graphics/new_svg_ref/dynamicslice.svg.zip differ diff --git a/graphics/new_svg_ref/ellipse.svg.zip b/graphics/new_svg_ref/ellipse.svg.zip new file mode 100644 index 0000000000..cdfab0d978 Binary files /dev/null and b/graphics/new_svg_ref/ellipse.svg.zip differ diff --git a/graphics/new_svg_ref/eval.svg.zip b/graphics/new_svg_ref/eval.svg.zip new file mode 100644 index 0000000000..b8b35e0a3a Binary files /dev/null and b/graphics/new_svg_ref/eval.svg.zip differ diff --git a/graphics/new_svg_ref/event.svg.zip b/graphics/new_svg_ref/event.svg.zip new file mode 100644 index 0000000000..fa728f8407 Binary files /dev/null and b/graphics/new_svg_ref/event.svg.zip differ diff --git a/graphics/new_svg_ref/exclusiongraph.svg.zip b/graphics/new_svg_ref/exclusiongraph.svg.zip new file mode 100644 index 0000000000..47fa16312e Binary files /dev/null and b/graphics/new_svg_ref/exclusiongraph.svg.zip differ diff --git a/graphics/new_svg_ref/exclusiongraph2.svg.zip b/graphics/new_svg_ref/exclusiongraph2.svg.zip new file mode 100644 index 0000000000..813f4d2c7d Binary files /dev/null and b/graphics/new_svg_ref/exclusiongraph2.svg.zip differ diff --git a/graphics/new_svg_ref/feynman.svg.zip b/graphics/new_svg_ref/feynman.svg.zip new file mode 100644 index 0000000000..6bd6393565 Binary files /dev/null and b/graphics/new_svg_ref/feynman.svg.zip differ diff --git a/graphics/new_svg_ref/fibonacci.svg.zip b/graphics/new_svg_ref/fibonacci.svg.zip new file mode 100644 index 0000000000..41b07bede2 Binary files /dev/null and b/graphics/new_svg_ref/fibonacci.svg.zip differ diff --git a/graphics/new_svg_ref/fillhistosauto2p.svg.zip b/graphics/new_svg_ref/fillhistosauto2p.svg.zip new file mode 100644 index 0000000000..9b3d55626a Binary files /dev/null and b/graphics/new_svg_ref/fillhistosauto2p.svg.zip differ diff --git a/graphics/new_svg_ref/fillrandom.svg.zip b/graphics/new_svg_ref/fillrandom.svg.zip new file mode 100644 index 0000000000..22ed2f8268 Binary files /dev/null and b/graphics/new_svg_ref/fillrandom.svg.zip differ diff --git a/graphics/new_svg_ref/first.svg.zip b/graphics/new_svg_ref/first.svg.zip new file mode 100644 index 0000000000..af2a021f15 Binary files /dev/null and b/graphics/new_svg_ref/first.svg.zip differ diff --git a/graphics/new_svg_ref/formula1.svg.zip b/graphics/new_svg_ref/formula1.svg.zip new file mode 100644 index 0000000000..9463489d5d Binary files /dev/null and b/graphics/new_svg_ref/formula1.svg.zip differ diff --git a/graphics/new_svg_ref/framework.svg.zip b/graphics/new_svg_ref/framework.svg.zip new file mode 100644 index 0000000000..f8f0c723d1 Binary files /dev/null and b/graphics/new_svg_ref/framework.svg.zip differ diff --git a/graphics/new_svg_ref/gammafun.svg.zip b/graphics/new_svg_ref/gammafun.svg.zip new file mode 100644 index 0000000000..477ef16431 Binary files /dev/null and b/graphics/new_svg_ref/gammafun.svg.zip differ diff --git a/graphics/new_svg_ref/gaussian_ratio_plot.svg.zip b/graphics/new_svg_ref/gaussian_ratio_plot.svg.zip new file mode 100644 index 0000000000..a2ba629468 Binary files /dev/null and b/graphics/new_svg_ref/gaussian_ratio_plot.svg.zip differ diff --git a/graphics/new_svg_ref/gaxis.svg.zip b/graphics/new_svg_ref/gaxis.svg.zip new file mode 100644 index 0000000000..a08d2ddca0 Binary files /dev/null and b/graphics/new_svg_ref/gaxis.svg.zip differ diff --git a/graphics/new_svg_ref/gaxis3.svg.zip b/graphics/new_svg_ref/gaxis3.svg.zip new file mode 100644 index 0000000000..03148aef2d Binary files /dev/null and b/graphics/new_svg_ref/gaxis3.svg.zip differ diff --git a/graphics/new_svg_ref/gerrors.svg.zip b/graphics/new_svg_ref/gerrors.svg.zip new file mode 100644 index 0000000000..489cb4b359 Binary files /dev/null and b/graphics/new_svg_ref/gerrors.svg.zip differ diff --git a/graphics/new_svg_ref/gerrors2.svg.zip b/graphics/new_svg_ref/gerrors2.svg.zip new file mode 100644 index 0000000000..cfec91a8bb Binary files /dev/null and b/graphics/new_svg_ref/gerrors2.svg.zip differ diff --git a/graphics/new_svg_ref/gmultierrors.svg.zip b/graphics/new_svg_ref/gmultierrors.svg.zip new file mode 100644 index 0000000000..7319ef1c14 Binary files /dev/null and b/graphics/new_svg_ref/gmultierrors.svg.zip differ diff --git a/graphics/new_svg_ref/graph.svg.zip b/graphics/new_svg_ref/graph.svg.zip new file mode 100644 index 0000000000..211a90ff73 Binary files /dev/null and b/graphics/new_svg_ref/graph.svg.zip differ diff --git a/graphics/new_svg_ref/graph2derrorsfit.svg.zip b/graphics/new_svg_ref/graph2derrorsfit.svg.zip new file mode 100644 index 0000000000..3d5982f257 Binary files /dev/null and b/graphics/new_svg_ref/graph2derrorsfit.svg.zip differ diff --git a/graphics/new_svg_ref/graphapply.svg.zip b/graphics/new_svg_ref/graphapply.svg.zip new file mode 100644 index 0000000000..fbad2ece5f Binary files /dev/null and b/graphics/new_svg_ref/graphapply.svg.zip differ diff --git a/graphics/new_svg_ref/graphpolar.svg.zip b/graphics/new_svg_ref/graphpolar.svg.zip new file mode 100644 index 0000000000..b4f3f230a9 Binary files /dev/null and b/graphics/new_svg_ref/graphpolar.svg.zip differ diff --git a/graphics/new_svg_ref/graphpolar2.svg.zip b/graphics/new_svg_ref/graphpolar2.svg.zip new file mode 100644 index 0000000000..fedcac573f Binary files /dev/null and b/graphics/new_svg_ref/graphpolar2.svg.zip differ diff --git a/graphics/new_svg_ref/graphpolar3.svg.zip b/graphics/new_svg_ref/graphpolar3.svg.zip new file mode 100644 index 0000000000..56531bf1ef Binary files /dev/null and b/graphics/new_svg_ref/graphpolar3.svg.zip differ diff --git a/graphics/new_svg_ref/graphreverse.svg.zip b/graphics/new_svg_ref/graphreverse.svg.zip new file mode 100644 index 0000000000..6b2bd8d0c3 Binary files /dev/null and b/graphics/new_svg_ref/graphreverse.svg.zip differ diff --git a/graphics/new_svg_ref/graphshade.svg.zip b/graphics/new_svg_ref/graphshade.svg.zip new file mode 100644 index 0000000000..7e78e0858f Binary files /dev/null and b/graphics/new_svg_ref/graphshade.svg.zip differ diff --git a/graphics/new_svg_ref/greyscale.svg.zip b/graphics/new_svg_ref/greyscale.svg.zip new file mode 100644 index 0000000000..ffa3e2a8da Binary files /dev/null and b/graphics/new_svg_ref/greyscale.svg.zip differ diff --git a/graphics/new_svg_ref/h2_cut.svg.zip b/graphics/new_svg_ref/h2_cut.svg.zip new file mode 100644 index 0000000000..da567f026d Binary files /dev/null and b/graphics/new_svg_ref/h2_cut.svg.zip differ diff --git a/graphics/new_svg_ref/h2proj.svg.zip b/graphics/new_svg_ref/h2proj.svg.zip new file mode 100644 index 0000000000..48c1cbd70a Binary files /dev/null and b/graphics/new_svg_ref/h2proj.svg.zip differ diff --git a/graphics/new_svg_ref/histpalettecolor.svg.zip b/graphics/new_svg_ref/histpalettecolor.svg.zip new file mode 100644 index 0000000000..a2945a0af5 Binary files /dev/null and b/graphics/new_svg_ref/histpalettecolor.svg.zip differ diff --git a/graphics/new_svg_ref/hksimple.svg.zip b/graphics/new_svg_ref/hksimple.svg.zip new file mode 100644 index 0000000000..c85cbef288 Binary files /dev/null and b/graphics/new_svg_ref/hksimple.svg.zip differ diff --git a/graphics/new_svg_ref/hlabels1.svg.zip b/graphics/new_svg_ref/hlabels1.svg.zip new file mode 100644 index 0000000000..f9d725ccf3 Binary files /dev/null and b/graphics/new_svg_ref/hlabels1.svg.zip differ diff --git a/graphics/new_svg_ref/hlgraph1.svg.zip b/graphics/new_svg_ref/hlgraph1.svg.zip new file mode 100644 index 0000000000..906263392e Binary files /dev/null and b/graphics/new_svg_ref/hlgraph1.svg.zip differ diff --git a/graphics/new_svg_ref/hlhisto1.svg.zip b/graphics/new_svg_ref/hlhisto1.svg.zip new file mode 100644 index 0000000000..6ca9575c26 Binary files /dev/null and b/graphics/new_svg_ref/hlhisto1.svg.zip differ diff --git a/graphics/new_svg_ref/hlhisto2.svg.zip b/graphics/new_svg_ref/hlhisto2.svg.zip new file mode 100644 index 0000000000..f388938a94 Binary files /dev/null and b/graphics/new_svg_ref/hlhisto2.svg.zip differ diff --git a/graphics/new_svg_ref/hlquantiles.svg.zip b/graphics/new_svg_ref/hlquantiles.svg.zip new file mode 100644 index 0000000000..3eb5b76ce5 Binary files /dev/null and b/graphics/new_svg_ref/hlquantiles.svg.zip differ diff --git a/graphics/new_svg_ref/hstack.svg.zip b/graphics/new_svg_ref/hstack.svg.zip new file mode 100644 index 0000000000..44e2d9915b Binary files /dev/null and b/graphics/new_svg_ref/hstack.svg.zip differ diff --git a/graphics/new_svg_ref/labels1.svg.zip b/graphics/new_svg_ref/labels1.svg.zip new file mode 100644 index 0000000000..64f84a19d2 Binary files /dev/null and b/graphics/new_svg_ref/labels1.svg.zip differ diff --git a/graphics/new_svg_ref/labels2.svg.zip b/graphics/new_svg_ref/labels2.svg.zip new file mode 100644 index 0000000000..0510bfb8d9 Binary files /dev/null and b/graphics/new_svg_ref/labels2.svg.zip differ diff --git a/graphics/new_svg_ref/latex.svg.zip b/graphics/new_svg_ref/latex.svg.zip new file mode 100644 index 0000000000..d60805e1b6 Binary files /dev/null and b/graphics/new_svg_ref/latex.svg.zip differ diff --git a/graphics/new_svg_ref/latex2.svg.zip b/graphics/new_svg_ref/latex2.svg.zip new file mode 100644 index 0000000000..ae230982d0 Binary files /dev/null and b/graphics/new_svg_ref/latex2.svg.zip differ diff --git a/graphics/new_svg_ref/latex3.svg.zip b/graphics/new_svg_ref/latex3.svg.zip new file mode 100644 index 0000000000..b4e2450e3e Binary files /dev/null and b/graphics/new_svg_ref/latex3.svg.zip differ diff --git a/graphics/new_svg_ref/latex4.svg.zip b/graphics/new_svg_ref/latex4.svg.zip new file mode 100644 index 0000000000..cd62a312a7 Binary files /dev/null and b/graphics/new_svg_ref/latex4.svg.zip differ diff --git a/graphics/new_svg_ref/latex5.svg.zip b/graphics/new_svg_ref/latex5.svg.zip new file mode 100644 index 0000000000..f93ec85abc Binary files /dev/null and b/graphics/new_svg_ref/latex5.svg.zip differ diff --git a/graphics/new_svg_ref/legendautoplaced.svg.zip b/graphics/new_svg_ref/legendautoplaced.svg.zip new file mode 100644 index 0000000000..72020c8458 Binary files /dev/null and b/graphics/new_svg_ref/legendautoplaced.svg.zip differ diff --git a/graphics/new_svg_ref/logscales.svg.zip b/graphics/new_svg_ref/logscales.svg.zip new file mode 100644 index 0000000000..4e9961ffd5 Binary files /dev/null and b/graphics/new_svg_ref/logscales.svg.zip differ diff --git a/graphics/new_svg_ref/markerwarning.svg.zip b/graphics/new_svg_ref/markerwarning.svg.zip new file mode 100644 index 0000000000..143af21797 Binary files /dev/null and b/graphics/new_svg_ref/markerwarning.svg.zip differ diff --git a/graphics/new_svg_ref/mass_spectrum.svg.zip b/graphics/new_svg_ref/mass_spectrum.svg.zip new file mode 100644 index 0000000000..7c40ab2487 Binary files /dev/null and b/graphics/new_svg_ref/mass_spectrum.svg.zip differ diff --git a/graphics/new_svg_ref/mathbeta.svg.zip b/graphics/new_svg_ref/mathbeta.svg.zip new file mode 100644 index 0000000000..06cc80e752 Binary files /dev/null and b/graphics/new_svg_ref/mathbeta.svg.zip differ diff --git a/graphics/new_svg_ref/mathcorecdf.svg.zip b/graphics/new_svg_ref/mathcorecdf.svg.zip new file mode 100644 index 0000000000..3320eb74b6 Binary files /dev/null and b/graphics/new_svg_ref/mathcorecdf.svg.zip differ diff --git a/graphics/new_svg_ref/mathcorestatfunc.svg.zip b/graphics/new_svg_ref/mathcorestatfunc.svg.zip new file mode 100644 index 0000000000..12edfba041 Binary files /dev/null and b/graphics/new_svg_ref/mathcorestatfunc.svg.zip differ diff --git a/graphics/new_svg_ref/mathgammanormal.svg.zip b/graphics/new_svg_ref/mathgammanormal.svg.zip new file mode 100644 index 0000000000..bcb730ad60 Binary files /dev/null and b/graphics/new_svg_ref/mathgammanormal.svg.zip differ diff --git a/graphics/new_svg_ref/mathlaplace.svg.zip b/graphics/new_svg_ref/mathlaplace.svg.zip new file mode 100644 index 0000000000..d05021b1e1 Binary files /dev/null and b/graphics/new_svg_ref/mathlaplace.svg.zip differ diff --git a/graphics/new_svg_ref/mathstudent.svg.zip b/graphics/new_svg_ref/mathstudent.svg.zip new file mode 100644 index 0000000000..bc62ed7148 Binary files /dev/null and b/graphics/new_svg_ref/mathstudent.svg.zip differ diff --git a/graphics/new_svg_ref/movepalette.svg.zip b/graphics/new_svg_ref/movepalette.svg.zip new file mode 100644 index 0000000000..dc284c634a Binary files /dev/null and b/graphics/new_svg_ref/movepalette.svg.zip differ diff --git a/graphics/new_svg_ref/multicolor.svg.zip b/graphics/new_svg_ref/multicolor.svg.zip new file mode 100644 index 0000000000..578cadafdc Binary files /dev/null and b/graphics/new_svg_ref/multicolor.svg.zip differ diff --git a/graphics/new_svg_ref/multigraph.svg.zip b/graphics/new_svg_ref/multigraph.svg.zip new file mode 100644 index 0000000000..300be55b03 Binary files /dev/null and b/graphics/new_svg_ref/multigraph.svg.zip differ diff --git a/graphics/new_svg_ref/normaldist.svg.zip b/graphics/new_svg_ref/normaldist.svg.zip new file mode 100644 index 0000000000..fcae228248 Binary files /dev/null and b/graphics/new_svg_ref/normaldist.svg.zip differ diff --git a/graphics/new_svg_ref/normalizehistogram.svg.zip b/graphics/new_svg_ref/normalizehistogram.svg.zip new file mode 100644 index 0000000000..87855a63f9 Binary files /dev/null and b/graphics/new_svg_ref/normalizehistogram.svg.zip differ diff --git a/graphics/new_svg_ref/pavetext.svg.zip b/graphics/new_svg_ref/pavetext.svg.zip new file mode 100644 index 0000000000..121a994ead Binary files /dev/null and b/graphics/new_svg_ref/pavetext.svg.zip differ diff --git a/graphics/new_svg_ref/piechart.svg.zip b/graphics/new_svg_ref/piechart.svg.zip new file mode 100644 index 0000000000..005b2f3f4e Binary files /dev/null and b/graphics/new_svg_ref/piechart.svg.zip differ diff --git a/graphics/new_svg_ref/quantiles.svg.zip b/graphics/new_svg_ref/quantiles.svg.zip new file mode 100644 index 0000000000..55f76705eb Binary files /dev/null and b/graphics/new_svg_ref/quantiles.svg.zip differ diff --git a/graphics/new_svg_ref/quarks.svg.zip b/graphics/new_svg_ref/quarks.svg.zip new file mode 100644 index 0000000000..f3e07102f7 Binary files /dev/null and b/graphics/new_svg_ref/quarks.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplot1.svg.zip b/graphics/new_svg_ref/ratioplot1.svg.zip new file mode 100644 index 0000000000..9c5bc676b1 Binary files /dev/null and b/graphics/new_svg_ref/ratioplot1.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplot2.svg.zip b/graphics/new_svg_ref/ratioplot2.svg.zip new file mode 100644 index 0000000000..63ee28e795 Binary files /dev/null and b/graphics/new_svg_ref/ratioplot2.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplot3.svg.zip b/graphics/new_svg_ref/ratioplot3.svg.zip new file mode 100644 index 0000000000..623833bcdf Binary files /dev/null and b/graphics/new_svg_ref/ratioplot3.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplot4.svg.zip b/graphics/new_svg_ref/ratioplot4.svg.zip new file mode 100644 index 0000000000..b9062eb83d Binary files /dev/null and b/graphics/new_svg_ref/ratioplot4.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplot5.svg.zip b/graphics/new_svg_ref/ratioplot5.svg.zip new file mode 100644 index 0000000000..20c13e63ed Binary files /dev/null and b/graphics/new_svg_ref/ratioplot5.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplot6.svg.zip b/graphics/new_svg_ref/ratioplot6.svg.zip new file mode 100644 index 0000000000..e8b75d9eb8 Binary files /dev/null and b/graphics/new_svg_ref/ratioplot6.svg.zip differ diff --git a/graphics/new_svg_ref/ratioplotold.svg.zip b/graphics/new_svg_ref/ratioplotold.svg.zip new file mode 100644 index 0000000000..cda570f83d Binary files /dev/null and b/graphics/new_svg_ref/ratioplotold.svg.zip differ diff --git a/graphics/new_svg_ref/rebin.svg.zip b/graphics/new_svg_ref/rebin.svg.zip new file mode 100644 index 0000000000..5ae89d7e7b Binary files /dev/null and b/graphics/new_svg_ref/rebin.svg.zip differ diff --git a/graphics/new_svg_ref/reverseaxis.svg.zip b/graphics/new_svg_ref/reverseaxis.svg.zip new file mode 100644 index 0000000000..84faf3ed62 Binary files /dev/null and b/graphics/new_svg_ref/reverseaxis.svg.zip differ diff --git a/graphics/new_svg_ref/scatter.svg.zip b/graphics/new_svg_ref/scatter.svg.zip new file mode 100644 index 0000000000..4ddc221114 Binary files /dev/null and b/graphics/new_svg_ref/scatter.svg.zip differ diff --git a/graphics/new_svg_ref/schroedinger_hydrogen.svg.zip b/graphics/new_svg_ref/schroedinger_hydrogen.svg.zip new file mode 100644 index 0000000000..a7b64cfa4c Binary files /dev/null and b/graphics/new_svg_ref/schroedinger_hydrogen.svg.zip differ diff --git a/graphics/new_svg_ref/surfaces.svg.zip b/graphics/new_svg_ref/surfaces.svg.zip new file mode 100644 index 0000000000..966f8edd42 Binary files /dev/null and b/graphics/new_svg_ref/surfaces.svg.zip differ diff --git a/graphics/new_svg_ref/testsmooth.svg.zip b/graphics/new_svg_ref/testsmooth.svg.zip new file mode 100644 index 0000000000..6265bdb394 Binary files /dev/null and b/graphics/new_svg_ref/testsmooth.svg.zip differ diff --git a/graphics/new_svg_ref/th2polyboxes.svg.zip b/graphics/new_svg_ref/th2polyboxes.svg.zip new file mode 100644 index 0000000000..654f2975db Binary files /dev/null and b/graphics/new_svg_ref/th2polyboxes.svg.zip differ diff --git a/graphics/new_svg_ref/th2polyeurope.svg.zip b/graphics/new_svg_ref/th2polyeurope.svg.zip new file mode 100644 index 0000000000..f862316593 Binary files /dev/null and b/graphics/new_svg_ref/th2polyeurope.svg.zip differ diff --git a/graphics/new_svg_ref/th2polyhoneycomb.svg.zip b/graphics/new_svg_ref/th2polyhoneycomb.svg.zip new file mode 100644 index 0000000000..77a61a277f Binary files /dev/null and b/graphics/new_svg_ref/th2polyhoneycomb.svg.zip differ diff --git a/graphics/new_svg_ref/th2polyusa.svg.zip b/graphics/new_svg_ref/th2polyusa.svg.zip new file mode 100644 index 0000000000..bfe5944b12 Binary files /dev/null and b/graphics/new_svg_ref/th2polyusa.svg.zip differ diff --git a/graphics/new_svg_ref/timeonaxis.svg.zip b/graphics/new_svg_ref/timeonaxis.svg.zip new file mode 100644 index 0000000000..83f481476f Binary files /dev/null and b/graphics/new_svg_ref/timeonaxis.svg.zip differ diff --git a/graphics/new_svg_ref/timeonaxis2.svg.zip b/graphics/new_svg_ref/timeonaxis2.svg.zip new file mode 100644 index 0000000000..18d903527f Binary files /dev/null and b/graphics/new_svg_ref/timeonaxis2.svg.zip differ diff --git a/graphics/new_svg_ref/timeonaxis3.svg.zip b/graphics/new_svg_ref/timeonaxis3.svg.zip new file mode 100644 index 0000000000..e0199bfa10 Binary files /dev/null and b/graphics/new_svg_ref/timeonaxis3.svg.zip differ diff --git a/graphics/new_svg_ref/tmathtext.svg.zip b/graphics/new_svg_ref/tmathtext.svg.zip new file mode 100644 index 0000000000..932e71d1bb Binary files /dev/null and b/graphics/new_svg_ref/tmathtext.svg.zip differ diff --git a/graphics/new_svg_ref/tmathtext2.svg.zip b/graphics/new_svg_ref/tmathtext2.svg.zip new file mode 100644 index 0000000000..86be661c44 Binary files /dev/null and b/graphics/new_svg_ref/tmathtext2.svg.zip differ diff --git a/graphics/new_svg_ref/transparency.svg.zip b/graphics/new_svg_ref/transparency.svg.zip new file mode 100644 index 0000000000..e230d24bc8 Binary files /dev/null and b/graphics/new_svg_ref/transparency.svg.zip differ diff --git a/graphics/new_svg_ref/triangles.svg.zip b/graphics/new_svg_ref/triangles.svg.zip new file mode 100644 index 0000000000..96428ab9a7 Binary files /dev/null and b/graphics/new_svg_ref/triangles.svg.zip differ diff --git a/graphics/new_svg_ref/twoscales.svg.zip b/graphics/new_svg_ref/twoscales.svg.zip new file mode 100644 index 0000000000..5a780f3149 Binary files /dev/null and b/graphics/new_svg_ref/twoscales.svg.zip differ diff --git a/graphics/new_svg_ref/vavilov.svg.zip b/graphics/new_svg_ref/vavilov.svg.zip new file mode 100644 index 0000000000..68a2f37ee5 Binary files /dev/null and b/graphics/new_svg_ref/vavilov.svg.zip differ diff --git a/graphics/new_svg_ref/waves.svg.zip b/graphics/new_svg_ref/waves.svg.zip new file mode 100644 index 0000000000..40c8438d0c Binary files /dev/null and b/graphics/new_svg_ref/waves.svg.zip differ diff --git a/graphics/new_svg_ref/xyplot.svg.zip b/graphics/new_svg_ref/xyplot.svg.zip new file mode 100644 index 0000000000..388ce99265 Binary files /dev/null and b/graphics/new_svg_ref/xyplot.svg.zip differ diff --git a/graphics/new_svg_ref/zdemo.svg.zip b/graphics/new_svg_ref/zdemo.svg.zip new file mode 100644 index 0000000000..d63ed0c88e Binary files /dev/null and b/graphics/new_svg_ref/zdemo.svg.zip differ diff --git a/graphics/new_svg_ref/zones.svg.zip b/graphics/new_svg_ref/zones.svg.zip new file mode 100644 index 0000000000..d5ae4e6379 Binary files /dev/null and b/graphics/new_svg_ref/zones.svg.zip differ diff --git a/graphics/new_svg_ref/zoomhistogram.svg.zip b/graphics/new_svg_ref/zoomhistogram.svg.zip new file mode 100644 index 0000000000..e3b870e329 Binary files /dev/null and b/graphics/new_svg_ref/zoomhistogram.svg.zip differ diff --git a/graphics/svg_ref/AtlasExample.svg.zip b/graphics/svg_ref/AtlasExample.svg.zip deleted file mode 100644 index ebd48bb1ef..0000000000 Binary files a/graphics/svg_ref/AtlasExample.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/BreitWigner.svg.zip b/graphics/svg_ref/BreitWigner.svg.zip deleted file mode 100644 index 8a9ac0709b..0000000000 Binary files a/graphics/svg_ref/BreitWigner.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/CrystalBall.svg.zip b/graphics/svg_ref/CrystalBall.svg.zip deleted file mode 100644 index a0c83736e3..0000000000 Binary files a/graphics/svg_ref/CrystalBall.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/DynamicSlice.svg.zip b/graphics/svg_ref/DynamicSlice.svg.zip deleted file mode 100644 index ffb57f7ba7..0000000000 Binary files a/graphics/svg_ref/DynamicSlice.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/Fibonacci.svg.zip b/graphics/svg_ref/Fibonacci.svg.zip deleted file mode 100644 index 32ec33b62a..0000000000 Binary files a/graphics/svg_ref/Fibonacci.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/GammaFun.svg.zip b/graphics/svg_ref/GammaFun.svg.zip deleted file mode 100644 index 893b39c191..0000000000 Binary files a/graphics/svg_ref/GammaFun.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/NormalizeHistogram.svg.zip b/graphics/svg_ref/NormalizeHistogram.svg.zip deleted file mode 100644 index 28f91a99db..0000000000 Binary files a/graphics/svg_ref/NormalizeHistogram.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/TSVDUnfoldExample.svg.zip b/graphics/svg_ref/TSVDUnfoldExample.svg.zip deleted file mode 100644 index a6661b2124..0000000000 Binary files a/graphics/svg_ref/TSVDUnfoldExample.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ZoomHistogram.svg.zip b/graphics/svg_ref/ZoomHistogram.svg.zip deleted file mode 100644 index 5a510b6397..0000000000 Binary files a/graphics/svg_ref/ZoomHistogram.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/analyze.svg.zip b/graphics/svg_ref/analyze.svg.zip deleted file mode 100644 index 41de9bd53a..0000000000 Binary files a/graphics/svg_ref/analyze.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/annotation3d.svg.zip b/graphics/svg_ref/annotation3d.svg.zip deleted file mode 100644 index 3984326336..0000000000 Binary files a/graphics/svg_ref/annotation3d.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/approx.svg.zip b/graphics/svg_ref/approx.svg.zip deleted file mode 100644 index 4396240523..0000000000 Binary files a/graphics/svg_ref/approx.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/archi.svg.zip b/graphics/svg_ref/archi.svg.zip deleted file mode 100644 index 2ac1e5a871..0000000000 Binary files a/graphics/svg_ref/archi.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/arrows.svg.zip b/graphics/svg_ref/arrows.svg.zip deleted file mode 100644 index 0e0c377401..0000000000 Binary files a/graphics/svg_ref/arrows.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/basic3d.svg.zip b/graphics/svg_ref/basic3d.svg.zip deleted file mode 100644 index 2433d4d2ef..0000000000 Binary files a/graphics/svg_ref/basic3d.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/candledecay.svg.zip b/graphics/svg_ref/candledecay.svg.zip deleted file mode 100644 index 69bc905fe5..0000000000 Binary files a/graphics/svg_ref/candledecay.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/candleplot.svg.zip b/graphics/svg_ref/candleplot.svg.zip deleted file mode 100644 index ac463830b3..0000000000 Binary files a/graphics/svg_ref/candleplot.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/candleplotstack.svg.zip b/graphics/svg_ref/candleplotstack.svg.zip deleted file mode 100644 index 86370c71f6..0000000000 Binary files a/graphics/svg_ref/candleplotstack.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/candleplotwhiskers.svg.zip b/graphics/svg_ref/candleplotwhiskers.svg.zip deleted file mode 100644 index 155468275a..0000000000 Binary files a/graphics/svg_ref/candleplotwhiskers.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/candlescaled.svg.zip b/graphics/svg_ref/candlescaled.svg.zip deleted file mode 100644 index f6f79bd2d1..0000000000 Binary files a/graphics/svg_ref/candlescaled.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/canvas.svg.zip b/graphics/svg_ref/canvas.svg.zip deleted file mode 100644 index 1b0a895c8b..0000000000 Binary files a/graphics/svg_ref/canvas.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/chi2test.svg.zip b/graphics/svg_ref/chi2test.svg.zip deleted file mode 100644 index 03f4f0910b..0000000000 Binary files a/graphics/svg_ref/chi2test.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/compile.svg.zip b/graphics/svg_ref/compile.svg.zip deleted file mode 100644 index a539343d3f..0000000000 Binary files a/graphics/svg_ref/compile.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/crown.svg.zip b/graphics/svg_ref/crown.svg.zip deleted file mode 100644 index aa63054bd8..0000000000 Binary files a/graphics/svg_ref/crown.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ellipse.svg.zip b/graphics/svg_ref/ellipse.svg.zip deleted file mode 100644 index f837ac2d4e..0000000000 Binary files a/graphics/svg_ref/ellipse.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/eval.svg.zip b/graphics/svg_ref/eval.svg.zip deleted file mode 100644 index ba73e4f52a..0000000000 Binary files a/graphics/svg_ref/eval.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/event.svg.zip b/graphics/svg_ref/event.svg.zip deleted file mode 100644 index 75bee54646..0000000000 Binary files a/graphics/svg_ref/event.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/exclusiongraph.svg.zip b/graphics/svg_ref/exclusiongraph.svg.zip deleted file mode 100644 index 6cc5189e19..0000000000 Binary files a/graphics/svg_ref/exclusiongraph.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/exclusiongraph2.svg.zip b/graphics/svg_ref/exclusiongraph2.svg.zip deleted file mode 100644 index 363d0834c9..0000000000 Binary files a/graphics/svg_ref/exclusiongraph2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/feynman.svg.zip b/graphics/svg_ref/feynman.svg.zip deleted file mode 100644 index cd1ead585d..0000000000 Binary files a/graphics/svg_ref/feynman.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/fillhistosauto2p.svg.zip b/graphics/svg_ref/fillhistosauto2p.svg.zip deleted file mode 100644 index 5752c11107..0000000000 Binary files a/graphics/svg_ref/fillhistosauto2p.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/fillrandom.svg.zip b/graphics/svg_ref/fillrandom.svg.zip deleted file mode 100644 index 6f8667e7a7..0000000000 Binary files a/graphics/svg_ref/fillrandom.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/first.svg.zip b/graphics/svg_ref/first.svg.zip deleted file mode 100644 index 568f5a9350..0000000000 Binary files a/graphics/svg_ref/first.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/formula1.svg.zip b/graphics/svg_ref/formula1.svg.zip deleted file mode 100644 index 7050470292..0000000000 Binary files a/graphics/svg_ref/formula1.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/framework.svg.zip b/graphics/svg_ref/framework.svg.zip deleted file mode 100644 index 8a7445e454..0000000000 Binary files a/graphics/svg_ref/framework.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/gaussian_ratio_plot.svg.zip b/graphics/svg_ref/gaussian_ratio_plot.svg.zip deleted file mode 100644 index 231e5c595f..0000000000 Binary files a/graphics/svg_ref/gaussian_ratio_plot.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/gaxis.svg.zip b/graphics/svg_ref/gaxis.svg.zip deleted file mode 100644 index b864fc06d6..0000000000 Binary files a/graphics/svg_ref/gaxis.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/gaxis3.svg.zip b/graphics/svg_ref/gaxis3.svg.zip deleted file mode 100644 index 59d94647b6..0000000000 Binary files a/graphics/svg_ref/gaxis3.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/gerrors.svg.zip b/graphics/svg_ref/gerrors.svg.zip deleted file mode 100644 index 0b9c85a498..0000000000 Binary files a/graphics/svg_ref/gerrors.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/gerrors2.svg.zip b/graphics/svg_ref/gerrors2.svg.zip deleted file mode 100644 index aa38cbec7b..0000000000 Binary files a/graphics/svg_ref/gerrors2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/gmultierrors.svg.zip b/graphics/svg_ref/gmultierrors.svg.zip deleted file mode 100644 index 033f632ac2..0000000000 Binary files a/graphics/svg_ref/gmultierrors.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graph.svg.zip b/graphics/svg_ref/graph.svg.zip deleted file mode 100644 index f72665714b..0000000000 Binary files a/graphics/svg_ref/graph.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graph2derrorsfit.svg.zip b/graphics/svg_ref/graph2derrorsfit.svg.zip deleted file mode 100644 index 6e69c5eee0..0000000000 Binary files a/graphics/svg_ref/graph2derrorsfit.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graphApply.svg.zip b/graphics/svg_ref/graphApply.svg.zip deleted file mode 100644 index 21d7f76e6a..0000000000 Binary files a/graphics/svg_ref/graphApply.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graphShade.svg.zip b/graphics/svg_ref/graphShade.svg.zip deleted file mode 100644 index 090715a972..0000000000 Binary files a/graphics/svg_ref/graphShade.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graphpolar.svg.zip b/graphics/svg_ref/graphpolar.svg.zip deleted file mode 100644 index 42cc2fe9e4..0000000000 Binary files a/graphics/svg_ref/graphpolar.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graphpolar2.svg.zip b/graphics/svg_ref/graphpolar2.svg.zip deleted file mode 100644 index 4113010fec..0000000000 Binary files a/graphics/svg_ref/graphpolar2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graphpolar3.svg.zip b/graphics/svg_ref/graphpolar3.svg.zip deleted file mode 100644 index dc9ae72d62..0000000000 Binary files a/graphics/svg_ref/graphpolar3.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/graphreverse.svg.zip b/graphics/svg_ref/graphreverse.svg.zip deleted file mode 100644 index d13ea1a255..0000000000 Binary files a/graphics/svg_ref/graphreverse.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/greyscale.svg.zip b/graphics/svg_ref/greyscale.svg.zip deleted file mode 100644 index b8bc85adbf..0000000000 Binary files a/graphics/svg_ref/greyscale.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/h2_cut.svg.zip b/graphics/svg_ref/h2_cut.svg.zip deleted file mode 100644 index 600ed767ba..0000000000 Binary files a/graphics/svg_ref/h2_cut.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/h2proj.svg.zip b/graphics/svg_ref/h2proj.svg.zip deleted file mode 100644 index c9bd94e679..0000000000 Binary files a/graphics/svg_ref/h2proj.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/histpalettecolor.svg.zip b/graphics/svg_ref/histpalettecolor.svg.zip deleted file mode 100644 index 7f0737de0c..0000000000 Binary files a/graphics/svg_ref/histpalettecolor.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hksimple.svg.zip b/graphics/svg_ref/hksimple.svg.zip deleted file mode 100644 index 48016c68b3..0000000000 Binary files a/graphics/svg_ref/hksimple.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hlGraph1.svg.zip b/graphics/svg_ref/hlGraph1.svg.zip deleted file mode 100644 index b7f75cc84f..0000000000 Binary files a/graphics/svg_ref/hlGraph1.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hlHisto1.svg.zip b/graphics/svg_ref/hlHisto1.svg.zip deleted file mode 100644 index 2d11aa8710..0000000000 Binary files a/graphics/svg_ref/hlHisto1.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hlHisto2.svg.zip b/graphics/svg_ref/hlHisto2.svg.zip deleted file mode 100644 index ee0440e647..0000000000 Binary files a/graphics/svg_ref/hlHisto2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hlHisto4.svg.zip b/graphics/svg_ref/hlHisto4.svg.zip deleted file mode 100644 index 9d6a30b9c2..0000000000 Binary files a/graphics/svg_ref/hlHisto4.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hlabels1.svg.zip b/graphics/svg_ref/hlabels1.svg.zip deleted file mode 100644 index 4c299bcb98..0000000000 Binary files a/graphics/svg_ref/hlabels1.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hlquantiles.svg.zip b/graphics/svg_ref/hlquantiles.svg.zip deleted file mode 100644 index 1e4135801d..0000000000 Binary files a/graphics/svg_ref/hlquantiles.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/hstack.svg.zip b/graphics/svg_ref/hstack.svg.zip deleted file mode 100644 index 14b1813a43..0000000000 Binary files a/graphics/svg_ref/hstack.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/labels1.svg.zip b/graphics/svg_ref/labels1.svg.zip deleted file mode 100644 index 9889499dbe..0000000000 Binary files a/graphics/svg_ref/labels1.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/labels2.svg.zip b/graphics/svg_ref/labels2.svg.zip deleted file mode 100644 index e667503fca..0000000000 Binary files a/graphics/svg_ref/labels2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/latex.svg.zip b/graphics/svg_ref/latex.svg.zip deleted file mode 100644 index 1a3516bfd8..0000000000 Binary files a/graphics/svg_ref/latex.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/latex2.svg.zip b/graphics/svg_ref/latex2.svg.zip deleted file mode 100644 index 361e5864e5..0000000000 Binary files a/graphics/svg_ref/latex2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/latex3.svg.zip b/graphics/svg_ref/latex3.svg.zip deleted file mode 100644 index aa5b5636e7..0000000000 Binary files a/graphics/svg_ref/latex3.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/latex4.svg.zip b/graphics/svg_ref/latex4.svg.zip deleted file mode 100644 index 6d953c25d3..0000000000 Binary files a/graphics/svg_ref/latex4.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/latex5.svg.zip b/graphics/svg_ref/latex5.svg.zip deleted file mode 100644 index ad46a3a056..0000000000 Binary files a/graphics/svg_ref/latex5.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/legendautoplaced.svg.zip b/graphics/svg_ref/legendautoplaced.svg.zip deleted file mode 100644 index e413ddb186..0000000000 Binary files a/graphics/svg_ref/legendautoplaced.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/logscales.svg.zip b/graphics/svg_ref/logscales.svg.zip deleted file mode 100644 index 235ab954bf..0000000000 Binary files a/graphics/svg_ref/logscales.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/markerwarning.svg.zip b/graphics/svg_ref/markerwarning.svg.zip deleted file mode 100644 index 5525251c15..0000000000 Binary files a/graphics/svg_ref/markerwarning.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mass_spectrum.svg.zip b/graphics/svg_ref/mass_spectrum.svg.zip deleted file mode 100644 index c1ccb68abc..0000000000 Binary files a/graphics/svg_ref/mass_spectrum.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mathBeta.svg.zip b/graphics/svg_ref/mathBeta.svg.zip deleted file mode 100644 index 6f2b001b74..0000000000 Binary files a/graphics/svg_ref/mathBeta.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mathGammaNormal.svg.zip b/graphics/svg_ref/mathGammaNormal.svg.zip deleted file mode 100644 index 757aa372c8..0000000000 Binary files a/graphics/svg_ref/mathGammaNormal.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mathLaplace.svg.zip b/graphics/svg_ref/mathLaplace.svg.zip deleted file mode 100644 index bfd843c868..0000000000 Binary files a/graphics/svg_ref/mathLaplace.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mathStudent.svg.zip b/graphics/svg_ref/mathStudent.svg.zip deleted file mode 100644 index 3b31293083..0000000000 Binary files a/graphics/svg_ref/mathStudent.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mathcoreCDF.svg.zip b/graphics/svg_ref/mathcoreCDF.svg.zip deleted file mode 100644 index c6875bec45..0000000000 Binary files a/graphics/svg_ref/mathcoreCDF.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/mathcoreStatFunc.svg.zip b/graphics/svg_ref/mathcoreStatFunc.svg.zip deleted file mode 100644 index b6db7efadf..0000000000 Binary files a/graphics/svg_ref/mathcoreStatFunc.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/movepalette.svg.zip b/graphics/svg_ref/movepalette.svg.zip deleted file mode 100644 index 32810f1efe..0000000000 Binary files a/graphics/svg_ref/movepalette.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/multicolor.svg.zip b/graphics/svg_ref/multicolor.svg.zip deleted file mode 100644 index 73cfc4bdca..0000000000 Binary files a/graphics/svg_ref/multicolor.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/multigraph.svg.zip b/graphics/svg_ref/multigraph.svg.zip deleted file mode 100644 index 6903ae12b5..0000000000 Binary files a/graphics/svg_ref/multigraph.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/normalDist.svg.zip b/graphics/svg_ref/normalDist.svg.zip deleted file mode 100644 index 908bed5b99..0000000000 Binary files a/graphics/svg_ref/normalDist.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/pavetext.svg.zip b/graphics/svg_ref/pavetext.svg.zip deleted file mode 100644 index 1047bd0f99..0000000000 Binary files a/graphics/svg_ref/pavetext.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/piechart.svg.zip b/graphics/svg_ref/piechart.svg.zip deleted file mode 100644 index 3160a0452a..0000000000 Binary files a/graphics/svg_ref/piechart.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/quantiles.svg.zip b/graphics/svg_ref/quantiles.svg.zip deleted file mode 100644 index a83f9859cf..0000000000 Binary files a/graphics/svg_ref/quantiles.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/quarks.svg.zip b/graphics/svg_ref/quarks.svg.zip deleted file mode 100644 index a5551f94c3..0000000000 Binary files a/graphics/svg_ref/quarks.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplot1.svg.zip b/graphics/svg_ref/ratioplot1.svg.zip deleted file mode 100644 index 5fd3639d82..0000000000 Binary files a/graphics/svg_ref/ratioplot1.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplot2.svg.zip b/graphics/svg_ref/ratioplot2.svg.zip deleted file mode 100644 index 0c7424558c..0000000000 Binary files a/graphics/svg_ref/ratioplot2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplot3.svg.zip b/graphics/svg_ref/ratioplot3.svg.zip deleted file mode 100644 index 548482e0d4..0000000000 Binary files a/graphics/svg_ref/ratioplot3.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplot4.svg.zip b/graphics/svg_ref/ratioplot4.svg.zip deleted file mode 100644 index 5d7c7ed6af..0000000000 Binary files a/graphics/svg_ref/ratioplot4.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplot5.svg.zip b/graphics/svg_ref/ratioplot5.svg.zip deleted file mode 100644 index 6c25a355e2..0000000000 Binary files a/graphics/svg_ref/ratioplot5.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplot6.svg.zip b/graphics/svg_ref/ratioplot6.svg.zip deleted file mode 100644 index 2ee8ad5ed0..0000000000 Binary files a/graphics/svg_ref/ratioplot6.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/ratioplotOld.svg.zip b/graphics/svg_ref/ratioplotOld.svg.zip deleted file mode 100644 index f95266d035..0000000000 Binary files a/graphics/svg_ref/ratioplotOld.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/rebin.svg.zip b/graphics/svg_ref/rebin.svg.zip deleted file mode 100644 index 14a3245179..0000000000 Binary files a/graphics/svg_ref/rebin.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/reverseaxis.svg.zip b/graphics/svg_ref/reverseaxis.svg.zip deleted file mode 100644 index f80b8ac7ad..0000000000 Binary files a/graphics/svg_ref/reverseaxis.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/scatter.svg.zip b/graphics/svg_ref/scatter.svg.zip deleted file mode 100644 index c3390e0e0a..0000000000 Binary files a/graphics/svg_ref/scatter.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/schroedinger_hydrogen.svg.zip b/graphics/svg_ref/schroedinger_hydrogen.svg.zip deleted file mode 100644 index 7e87c2638c..0000000000 Binary files a/graphics/svg_ref/schroedinger_hydrogen.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/statsEditing.svg.zip b/graphics/svg_ref/statsEditing.svg.zip deleted file mode 100644 index 4db36dcef5..0000000000 Binary files a/graphics/svg_ref/statsEditing.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/surfaces.svg.zip b/graphics/svg_ref/surfaces.svg.zip deleted file mode 100644 index ea6287c6ea..0000000000 Binary files a/graphics/svg_ref/surfaces.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/testSmooth.svg.zip b/graphics/svg_ref/testSmooth.svg.zip deleted file mode 100644 index 5f9e9e3153..0000000000 Binary files a/graphics/svg_ref/testSmooth.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/th2polyBoxes.svg.zip b/graphics/svg_ref/th2polyBoxes.svg.zip deleted file mode 100644 index 6731b8592c..0000000000 Binary files a/graphics/svg_ref/th2polyBoxes.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/th2polyEurope.svg.zip b/graphics/svg_ref/th2polyEurope.svg.zip deleted file mode 100644 index 03fc0fad83..0000000000 Binary files a/graphics/svg_ref/th2polyEurope.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/th2polyHoneycomb.svg.zip b/graphics/svg_ref/th2polyHoneycomb.svg.zip deleted file mode 100644 index 1647a83456..0000000000 Binary files a/graphics/svg_ref/th2polyHoneycomb.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/th2polyUSA.svg.zip b/graphics/svg_ref/th2polyUSA.svg.zip deleted file mode 100644 index c26031bbbc..0000000000 Binary files a/graphics/svg_ref/th2polyUSA.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/timeonaxis.svg.zip b/graphics/svg_ref/timeonaxis.svg.zip deleted file mode 100644 index a27591c4f4..0000000000 Binary files a/graphics/svg_ref/timeonaxis.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/timeonaxis2.svg.zip b/graphics/svg_ref/timeonaxis2.svg.zip deleted file mode 100644 index cd77775d6b..0000000000 Binary files a/graphics/svg_ref/timeonaxis2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/timeonaxis3.svg.zip b/graphics/svg_ref/timeonaxis3.svg.zip deleted file mode 100644 index 9554ffca8f..0000000000 Binary files a/graphics/svg_ref/timeonaxis3.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/tmathtext.svg.zip b/graphics/svg_ref/tmathtext.svg.zip deleted file mode 100644 index 39a6744428..0000000000 Binary files a/graphics/svg_ref/tmathtext.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/tmathtext2.svg.zip b/graphics/svg_ref/tmathtext2.svg.zip deleted file mode 100644 index 783f20c632..0000000000 Binary files a/graphics/svg_ref/tmathtext2.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/transpad.svg.zip b/graphics/svg_ref/transpad.svg.zip deleted file mode 100644 index dbbaf97ed8..0000000000 Binary files a/graphics/svg_ref/transpad.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/transparency.svg.zip b/graphics/svg_ref/transparency.svg.zip deleted file mode 100644 index 43af4bb429..0000000000 Binary files a/graphics/svg_ref/transparency.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/triangles.svg.zip b/graphics/svg_ref/triangles.svg.zip deleted file mode 100644 index 9b6df6f2b4..0000000000 Binary files a/graphics/svg_ref/triangles.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/twoscales.svg.zip b/graphics/svg_ref/twoscales.svg.zip deleted file mode 100644 index 89e0cabbfb..0000000000 Binary files a/graphics/svg_ref/twoscales.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/vavilov.svg.zip b/graphics/svg_ref/vavilov.svg.zip deleted file mode 100644 index a2896849fd..0000000000 Binary files a/graphics/svg_ref/vavilov.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/waves.svg.zip b/graphics/svg_ref/waves.svg.zip deleted file mode 100644 index 4e3b3609bd..0000000000 Binary files a/graphics/svg_ref/waves.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/xyplot.svg.zip b/graphics/svg_ref/xyplot.svg.zip deleted file mode 100644 index 8bd13ab47e..0000000000 Binary files a/graphics/svg_ref/xyplot.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/zdemo.svg.zip b/graphics/svg_ref/zdemo.svg.zip deleted file mode 100644 index 3a929c4864..0000000000 Binary files a/graphics/svg_ref/zdemo.svg.zip and /dev/null differ diff --git a/graphics/svg_ref/zones.svg.zip b/graphics/svg_ref/zones.svg.zip deleted file mode 100644 index c19816e8e6..0000000000 Binary files a/graphics/svg_ref/zones.svg.zip and /dev/null differ diff --git a/graphics/testGraphics.C b/graphics/testGraphics.C index fd42c4c74d..8cdeb8adca 100644 --- a/graphics/testGraphics.C +++ b/graphics/testGraphics.C @@ -20,6 +20,7 @@ #include "TWebCanvas.h" #include "TLatex.h" #include +#include #include #include @@ -165,7 +166,7 @@ int test_json(TCanvas* c1, const std::string& macroName, const std::string& buil return 0; } -//---------------------SVG----------------------------------------------------------------- +//---------------------old SVG------------------------------------------------------------- // Function to remove or normalize specific parts of the SVG content std::string preprocessSVGContent(const std::string& svgContent) { std::string result = svgContent; @@ -181,7 +182,7 @@ std::string preprocessSVGContent(const std::string& svgContent) { return result; } -// Function to compare two SVG files (old graphics) +// Function to compare two old SVG files (old graphics) bool compareSVGFiles(const std::string& filePath1, const std::string& filePath2) { try { std::string content1 = readFileToString(filePath1); @@ -205,7 +206,7 @@ bool compareSVGFiles(const std::string& filePath1, const std::string& filePath2) } } -int test_svg(TCanvas* c1, const std::string& macroName, const std::string& builddir) { +int test_old_svg(TCanvas* c1, const std::string& macroName, const std::string& builddir) { // Paths to the reference and generated SVG files std::string refFilePath = "./old_svg_ref/" + macroName + ".svg"; std::string genFilePath = builddir + "/old_svg_pro/" + macroName + "_pro.svg"; @@ -223,9 +224,9 @@ int test_svg(TCanvas* c1, const std::string& macroName, const std::string& build // Compare the generated SVG file with the reference SVG file if (compareSVGFiles(refFilePath, genFilePath)) { - std::cout << "SVG test passed for " << macroName << std::endl; + std::cout << "Old SVG test passed for " << macroName << std::endl; } else { - std::cout << "SVG test failed for " << macroName << std::endl; + std::cout << "Old SVG test failed for " << macroName << std::endl; return 1; } return 0; @@ -273,10 +274,10 @@ bool comparePDFFiles(const std::string& filePath1, const std::string& filePath2) } } -int test_pdf(TCanvas* c1, const std::string& macroName, const std::string& buildir) { - // Paths to the reference and generated SVG files +int test_pdf(TCanvas* c1, const std::string& macroName, const std::string& builddir) { + // Paths to the reference and generated PDF files std::string refFilePath = "./pdf_ref/" + macroName + ".pdf"; - std::string genFilePath = buildir + "/pdf_pro/" + macroName + "_pro.pdf"; + std::string genFilePath = builddir + "/pdf_pro/" + macroName + "_pro.pdf"; // Check if the reference file exists FileStat_t fstat; @@ -298,6 +299,44 @@ int test_pdf(TCanvas* c1, const std::string& macroName, const std::string& build } return 0; } +//---------------------new SVG------------------------------------------------------------- +int test_new_svg(const std::string& macroName, const std::string& builddir){ + // Paths to the reference and generated new SVG files + std::string refFilePath = "./new_svg_ref/" + macroName + ".svg"; + std::string genFilePath = builddir + "/new_svg_pro/" + macroName + "_pro.svg"; + + // path to refernces json to generated new svg + std::string refJsonFilePath = "./json_ref/" + macroName + ".json"; + + // Read the JSON file + std::ifstream refJsonFile(refJsonFilePath); + if (!refJsonFile.is_open()) { + std::cerr << "Could not open the JSON file: " << refJsonFilePath << std::endl; + return 1; + } + std::string ref_json((std::istreambuf_iterator(refJsonFile)), std::istreambuf_iterator()); + refJsonFile.close(); + + // Check if the reference file exists + FileStat_t fstat; + if (1 == gSystem->GetPathInfo(refFilePath.c_str(), fstat)) { + std::cout << "Reference file not found. Saving generated file as reference: " << macroName << std::endl; + ROOT::RWebDisplayHandle::ProduceImage(refFilePath, ref_json, 1200, 800); + return 1; + } else { + // Save the generated SVG file + ROOT::RWebDisplayHandle::ProduceImage(genFilePath, ref_json, 1200, 800); + } + + // Compare the generated PDF file with the reference PDF file + if (compareSVGFiles(refFilePath, genFilePath)) { + std::cout << "New SVG test passed for " << macroName << std::endl; + } else { + std::cout << "New SVG failed for " << macroName << std::endl; + return 1; + } + return 0; +} // TEST ROOT MACRO ------------------------------------------------------------------------------- int testGraphics(const std::string& macroName, const std::string& test_type, const std::string& macro_folder, const std::string& builddir) { @@ -318,6 +357,9 @@ int testGraphics(const std::string& macroName, const std::string& test_type, con gStyle->SetStatTextColor(1); // Text color of stat box gStyle->SetStatBorderSize(1); // Border size of stat box + // Here one could set the precison + // TBufferText::SetFloatFormat("%.2f"); + // TBufferText::SetDoubleFormat("%.2f"); // Call the macro to generate the canvas std::string command = ".x " + macroPath; @@ -335,18 +377,23 @@ int testGraphics(const std::string& macroName, const std::string& test_type, con // j === test the JSON creation // o === test the SVG creation in ROOT (old graphics with --web=off) // p == test the PDF creation in ROOT (old graphics with --web=off) + // s == test the SVG creation in ROOT (new graphics with web=chrome) if (test_type == "j") { return test_json(c1, macroName, builddir); } if (test_type == "o") { gROOT->SetWebDisplay("off"); - return test_svg(c1, macroName, builddir); + return test_old_svg(c1, macroName, builddir); } if (test_type == "p") { gROOT->SetWebDisplay("off"); return test_pdf(c1, macroName, builddir); } + if (test_type == 's'){ + gROOT->SetWebDisplay("chrome"); + return test_new_svg(macroName, builddir); + } std::cerr << "Unrecognised test type '" << test_type << "'" << std::endl; return 1; }