Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar plot difference between standard plugin and print layout plugin #309

Open
pedrogeo opened this issue Jan 17, 2023 · 4 comments
Open
Labels

Comments

@pedrogeo
Copy link

Hi,

I use the bar plot in the print layout plugin and I notice that the result is not the same with the standard plugin. In the standard plugin, I see the years in the X axis (2020, 2021, 2022) and in the print layout plugin, I see (2019.5, 2020, 2020.5, 2021...).

Is it a bug or a different behaviour between the two plugins ?

The parameters are the same in both cases, the field used in X axis is a text field and the field used in the Y axis is a double field.

Finally, is there a way to change the appearance of the Y labels ? To pass from 15k to 15000 for example ?

Pierre

Standard plugin :

bar_plot_standard

Print layout plugin :

bar_plot_print_layout

  • OS: Windows 10 22H2
  • QGIS release QGIS 3.28.2
  • DataPlotly release 3.9.2
@pedrogeo pedrogeo added the bug label Jan 17, 2023
@ghtmtt
Copy link
Owner

ghtmtt commented Jan 26, 2023

I cannot fully confirm your issue. The rendering engine in the print layout might be a little bit different compared to the main plugin one, but I don't see this huge difference.

Are you sure that the x values are datetime? Eventually try to convert them with the to_date (or to_datetime) QGIS function.

With datetime values I've these outputs:

Print layout:

image

Plugin:

image

@ghtmtt ghtmtt added feedback and removed bug labels Jan 26, 2023
@pedrogeo
Copy link
Author

I tested by converting the field used in X axis to date format but it doesn't work better :
date

@ghtmtt
Copy link
Owner

ghtmtt commented Feb 3, 2023

can you please share your data? even a small subset is ok

@pedrogeo
Copy link
Author

pedrogeo commented Feb 3, 2023

Hi,

The file is in attachment below (inside .zip file) :

sample.zip

Pierre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants