7

I find myself in an unexpected situation. I've been working with an AI provider (who shall remain nameless) to use the pgfplots package to provide a graph with separate, but synchronized, axis (one on the left side and one on the right) with the appropriate titles, 'tick' marks and labels for each.

I thought to myself, the answer should be simple for an entity that contains all of human knowledge.

However, that was not the case.

There were certain details on the labelling of the right pgfplots ordinate axis that the AI could not address. The AI and I were able to get very near to the end, but only so far before the AI simply stopped offering solutions, and started making suggestions that I should consult other sources.

Although I never would have expected to be in this situation, SE has for years been a stalwart companion to resolve too many instances where I needed assistance. On the other hand, if memory serves, SE may not be sanguine with the idea of acting as a backup to an AI bot. I'm just not sure.

So I am posting here to ask, before I go any further, if it would be appropriate for me to post an MWE of the pgfplots LaTeX code in it's last incarnation here on SE to see if anyone has any ideas that the AI bot did not to complete the vision I had for my particular graph.

It may very well be that pgfplots simply cannot accommodate what it is I am attempting to do. The limited research I have done seems to suggest pgfplots can do what I want, but I am not an expert on pgfplots.

I'll leave this issue here for now and await to hear what the community decides. If the SE community approves, I will post the pgfplots MWE code for others to commiserate on. If not, I'll pursue other avenues.

Thank you.

12
  • 4
    I personally see no problem with you posting what you achieved so war, be it with the help of an AI bot or not. At least I will be happy trying to help and I am sure others around here will, too. The animosity against AI on this site is rather related to answers: Answers that are generated by an AI should not be bluntly posted here, especially not without prior testing whether this answer really works. But as for questions, I would argue, that posting some AI constructed (non-working) code is totally fine, especially if you already tried to fix it on your own. Commented Jul 19, 2023 at 6:07
  • 5
    As long s the focus is the outcome you want, rather than why the AI fails to get it right, that feels OK.
    – Joseph Wright Mod
    Commented Jul 19, 2023 at 6:07
  • 4
    I agree with JasperHabicht and JosephWright, but note that this question as posted here should really be posed on meta.
    – Skillmon
    Commented Jul 19, 2023 at 6:49
  • 1
    @Jasper Habicht (and Joseph Wright) - Thank you. Let me get my thoughts, MWE and PDF together so I can explain what I am looking for. Commented Jul 19, 2023 at 6:49
  • 4
    @RosesBouquet please ask a new question and don't alter this one. This question can serve the purpose of laying out the community specific rules regarding AI questions not only for your specific case but in general (which is why I voted to move it to meta).
    – Skillmon
    Commented Jul 19, 2023 at 7:01
  • @Skillmon - Apologies ... I just read your comment. I can delete my original posting from my update if that will help. Sorry! Commented Jul 19, 2023 at 7:28
  • 4
    Sorry: What is your question? Can you please highlight it, or make it easier to recognize, please? Thank you
    – MS-SPO
    Commented Jul 19, 2023 at 8:06
  • 1
    @MS-SPO - Apologies, I was offline for a few hours. Now that the question has migrated, should I still follow Skillmon's suggestion to create two separate questions: one with the original question, and a second with the MWE, including a clearer definition of what the actual question is? Commented Jul 19, 2023 at 17:05
  • Depends on the rules over there; but I assume they will follow the same concept. See tex.stackexchange.com/help/whats-meta as a starting point, or jsut wait for a comment from the new environment.
    – MS-SPO
    Commented Jul 19, 2023 at 17:28
  • 2
    OK ... I've posted a completely new question over at SE TeX under the title of "Creating pgfplots graphic with two separate, but synchronized, ordinate axis.", and removed the MWE and graphic from the post here. Did I get that right? Commented Jul 19, 2023 at 19:38
  • 1
    @RosesBouquet Not an expert on SE etiquette, but that seems right to me. The question about using the site on meta; the question about TeX on the main site ;).
    – cfr
    Commented Jul 20, 2023 at 13:24
  • 1
    @cfr - Thank you for the confirmation. Commented Jul 22, 2023 at 4:37

2 Answers 2

10

(Turning my prior comment into an answer:)

I personally see no problem with you posting what you achieved so far, be it with the help of an AI bot or not. At least I will be happy trying to help and I am sure others around here will, too.

The animosity against AI on this site is rather related to answers I would say: Answers that are generated by an AI should not be posted here in general (there might be exceptions), especially not without prior testing whether this answer really works. There exist a wide range of arguments about why AI generated answers are more likely harmful than helpful.

But as for questions, I would argue, that posting some AI constructed (non-working) code is totally fine, especially if you already tried to fix it on your own.

1
  • 15
    It might be good to add that saying it is AI-generated in the question may be helpful. If AIs tend to make certain mistakes or assumptions, for example, knowing code is AI-generated may help people identify problems more easily.
    – cfr
    Commented Jul 20, 2023 at 13:28
3

I have read the question posted on main (posted after this meta question suggested it was fine) and the question indeed seems ok, reasonably focussed and answerable.

However, for completeness/future reference I would like to add an answer here that this workflow, i.e., working with an AI chatbot to generate code and asking here to tweak some details, may not be the best approach. Again, in this case it worked out ok, but in general this may lead to questions that contain code or details that distract from the core question.

It would be best, as for all questions, to reduce the question to the core issue, in this case how to display a left and right y-axis where the left one has scientific notation and the right one has the same numbers but in simple notation. For an MWE that means you would remove essentially everything (i.e., all axis options, all addplots (or leave one with just f(x)=y), the legend etc., and just display the simplest possible plot with two axes in some range.

This has the advantage that the question is maximally focussed and easier to answer. It will be more searchable and reusable for future visitors. And furthermore, it will increase your understanding of pgfplots in a more fundamental way. Currently the answers that you got (although they contain useful explanations) are more or less the final step of your interaction with the AI bot, i.e., the answerers acted as the bot trying to improve the existing code (and succeeding where the bot could not). If the question would have been fully minimal then you would have needed to take that final step yourself, which would have improved your knowledge and skill more robustly.

As a side effect such a minimal question would be easier to identify as a duplicate, for example of Pgfplot with two y-axes not showing correct ytick values which has the same solution as given in the answer by Rmano on your current question - minus the exact positioning with log10(1050) etc, but you said you only wanted an approximate correspondence so just putting the second set of tick marks at equal distances would have worked fine I think, and if not then you could search for questions on how to position y ticks (such as yticklabels and ytick wont work) or how to use calculations inside tick mark position lists (such as https://tex.stackexchange.com/a/425277/89417).

1
  • Apologies for just getting back to read your post. Life has a way to shake things up at the most interesting of times (in this case with medical issues) ... but that is an aside to my appreciation for all of the responses and suggestions posted. My hope is that others who might have a similar vision of 2 somewhat related y-axes portrayed on the left and right y-axis have these responses and suggestions here on SE appear in a search. We'll see if sometime down the line that happens by someone who is grateful for the info posted and responds to let us know. Thank you all! Commented Aug 24, 2023 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .