Bug 489861 - Box/histrogram plots are not vectorized
Summary: Box/histrogram plots are not vectorized
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.10.1
Platform: Microsoft Windows All
: NOR minor
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-07 09:27 UTC by sulskis.d
Modified: 2024-07-07 18:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 2.11
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sulskis.d 2024-07-07 09:27:53 UTC
SUMMARY

While creating box and histogram plots, I noticed they are not vectorized and pixelated when zooming in. I also exported them to SVG to edit them in Inkscape, but they stayed pixelated. This does not happen with x-y curves plotting

STEPS TO REPRODUCE
1. Create a box or histogram plot
2. Zoom into the plot and check vectorization
3. Export plot as SVG file type
4. Open with Inkscape to inspect plots

OBSERVED RESULT

Pixelated plots

EXPECTED RESULT

Vectorized plots

SOFTWARE/OS VERSIONS
Windows: 2.10
macOS:  2.10.1



ADDITIONAL INFORMATION
Comment 1 Alexander Semke 2024-07-07 17:56:16 UTC
Git commit a66be684aa966205108c13e42a7d614abe07c9b9 by Alexander Semke.
Committed on 07/07/2024 at 17:50.
Pushed by asemke into branch 'master'.

Use the vectorized version of the plot during the exprot for all plot types
and not for XYCurve only.
FIXED-IN: 2.11

M  +1    -1    src/backend/worksheet/plots/cartesian/BarPlot.cpp
M  +1    -1    src/backend/worksheet/plots/cartesian/BoxPlot.cpp
M  +1    -1    src/backend/worksheet/plots/cartesian/Histogram.cpp
M  +1    -1    src/backend/worksheet/plots/cartesian/LollipopPlot.cpp

https://invent.kde.org/education/labplot/-/commit/a66be684aa966205108c13e42a7d614abe07c9b9
Comment 2 Alexander Semke 2024-07-07 18:02:08 UTC
(In reply to sulskis.d from comment #0)
> SUMMARY
> 
> While creating box and histogram plots, I noticed they are not vectorized
> and pixelated when zooming in. I also exported them to SVG to edit them in
> Inkscape, but they stayed pixelated. This does not happen with x-y curves
> plotting
> 
> STEPS TO REPRODUCE
> 1. Create a box or histogram plot
> 2. Zoom into the plot and check vectorization
> 3. Export plot as SVG file type
> 4. Open with Inkscape to inspect plots
> 
> OBSERVED RESULT
> 
> Pixelated plots

Thank your for reporting this issue! Internally we cache the results in a pixmap to have faster repainting of objects. During the export the vectorized version should be used which was not the case for other plot types. We fixed this issue now, the fix will be part of the next release 2.11 that should come in the next couple of days.

We also plan to improve the quality of drawing when zooming in also with cached pixmaps by recalculating them during the zoom. This will take more time and will come in later releases. If you need better quality now during the zoom-in on the worksheet, just deactivate the option "double buffering" for the worksheet in the application settings. Please note, this might make the application slower if you're plotting big data sets (millions of points or so).