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

Proposal: image layer above grid lines and below traces #4106

Closed
jonmmease opened this issue Aug 5, 2019 · 16 comments
Closed

Proposal: image layer above grid lines and below traces #4106

jonmmease opened this issue Aug 5, 2019 · 16 comments
Labels
feature something new

Comments

@jonmmease
Copy link
Contributor

jonmmease commented Aug 5, 2019

Currently images and shapes support a layer property to control whether objects are rendered 'above' the traces in the figure or 'below'. As shown in the following example, the 'below' mode also places the images/shapes below the grid lines.

CodePen: https://codepen.io/jonmmease/pen/EqbLej

newplot (3)

I find the the gridlines a bit distracting when placed on top of the image, and I would like to propose a third 'layer' option, 'between', that would place images/shapes above the gridlines and below the traces.

Do you think this would this require adding a new layer to the svg plot? or could the shapes/image be added to the layer the gird is currently drawn on?

@etpinard
Copy link
Contributor

etpinard commented Aug 5, 2019

Yep, I like the idea of adding a third layer value (that's why we added this attribute as an enumerated as opposed to a boolean).

Now, I would prefer something more precise than 'between'. Maybe 'above grid' would be better? In other words, above means "above everything', below means "below everything" and upcoming layer values will be named as either "above something" or "below something"`. What do you think?

Do you think this would this require adding a new layer to the svg plot?

Yes, most likely we'll need that in order to get showgrid and images[i].visible relayout calls to work correctly.

@etpinard etpinard added the feature something new label Aug 5, 2019
@etpinard
Copy link
Contributor

etpinard commented Aug 5, 2019

Come to think of it, maybe adding layer: 'below traces' would be even better for your use case?

@jonmmease
Copy link
Contributor Author

Yeah, I like that naming approach. layer: 'below traces' is probably the best name/meaning for what I'm interested in.

@nicolaskruchten
Copy link
Contributor

@jonmmease is this still relevant in an image trace-type world?

@jonmmease
Copy link
Contributor Author

Nah, I don't think so.

@gemmavnash
Copy link

@jonmmease is this still relevant in an image trace-type world?

Hi. I don't understand the above and want to have my shapes between my grids and traces. How do I go about this? Thanks in advance.

@nicolaskruchten
Copy link
Contributor

@gemmavnash if you can post at https://community.plotly.com/ describing what you're trying to do, we'll try to help you :)

@nicolaskruchten
Copy link
Contributor

This is still relevant in the case of shapes, however, as pointed out in https://community.plotly.com/t/show-shapes-below-traces-and-above-grid/38629/3

@vlastimil-dolejs
Copy link
Contributor

Hi, I'm struggling with the same issue - the shape with layer below is overlayed by the grid. I have found a workaround (which is not perfect, but better than nothing).
I'm setting both xaxis.gridcolor and yaxis.gridcolor to rgba(0, 0, 0, 0.07). This is the same as the default #eee if you have a white background, but will not overlay/hide the shape line that is below the grid. It will just slightly darken it.
Hope this will help someone. Still, it would be helpful to be able to define above grid/below trace layer for the shapes.

@yotkadata
Copy link

+1 For this proposal. I am also working with a (line) shape that should appear below traces but above the grid.

@wmachadoa
Copy link

wmachadoa commented Jan 26, 2023

Any follow up on this proposal? Or has anyone found a work-around for shapes?

@subsurfaceiodev
Copy link

We also need this feature! Any updates on this?

@jorge243
Copy link

Hi! Is there any solution yet for this issue? I love plotly and its great utility but i find it hard to believe that such a basic and essential task like this can't be achieved.

@carschandler
Copy link

Bump!

@marcosberghahn
Copy link

marcosberghahn commented Feb 27, 2024

oh my, old issue hun?
so + 1 needing this.

@Coding-with-Adam
Copy link
Contributor

Solved by #6927

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

No branches or pull requests